FirebirdSQL / php-firebird

Firebird PHP driver
https://firebirdsql.org/en/php-driver/
Other
65 stars 17 forks source link

error when i use ibase_prepare and ibase_exec with numeric parameters #7

Closed julienheroux closed 3 years ago

julienheroux commented 4 years ago

Hi, On some server in php 7.2.34 i've got error when i try to do :

$tmp=ibase_prepare($dbh, 'SELECT * FROM myTable WHERE myField = ?');
$tmp2=ibase_execute($tmp,1);

the error: Dynamic SQL Error SQL error code = -303 arithmetic exception, numeric overflow, or string truncation This problem is present only on some server and when i use integer parameters. if i do:

$tmp=ibase_prepare($dbh, 'SELECT * FROM myTable WHERE myField = 1');
$tmp2=ibase_execute($tmp);

it works. I don't understand what's the problem. Any idea ?

mrotteveel commented 4 years ago

What is the type of myField?

julienheroux commented 4 years ago

myField is an integer

julienheroux commented 3 years ago

Hi, The problem disappears when i've update friebrid database from 2.1 to 2.5.9 Thanks