Subject RE: [Firebird-general] Another php niggle ...
Author Svein Erling Tysvær
>select * from test6 where v_integer between ? and ?
>
>Table has 4,5,6,7,8,9 as integers ...
>passing "5" and 7.5 as parameters returns 5,6,7 and 8 which I think is exactly
>as I would expect as 7.5 would be rounded up when converting to an integer?
>But the interbase test is saying that returning '8' is wrong. Feeding 7.499
>gives the expected result, but what is the 'right' result? More important is
>this a rounding happening in php or in firebird?

Running a similar test in Firebird 1.5 and Firebird 2.5 (using DB Workbench) I get only one row returned when I specify between 5 and 5.7, it is only when I specify between 5 and cast(5.7 as integer) I get two rows. Hence, I guess the rounding is done by php.

By the way, I'd say this is more appropriate for firebird-support than firebird-general.

Set