I have to migrate a web application written in PHP and I am using
PHP 5.2.6 ISAPI.
The problem I have is related to some sql queries that have the
following format:
$sql = "insert into table_name values ('','" . $value1 . "','" .
$value2 . "',')";
This fails because PHP will translate this in something like:
Insert into table_name values (", '10','15')
In other words if I have in my script something like '10' that will
translated into
the same '10' but something like '' will make the final query string
to look different
and to fail.
This script run without problems in the old server and I guess should
be something
in PHP.ini but I cannot find what is different.
Is there a setting in php.ini that can fix this?
Thank you!
PHP 5.2.6 ISAPI.
The problem I have is related to some sql queries that have the
following format:
$sql = "insert into table_name values ('','" . $value1 . "','" .
$value2 . "',')";
This fails because PHP will translate this in something like:
Insert into table_name values (", '10','15')
In other words if I have in my script something like '10' that will
translated into
the same '10' but something like '' will make the final query string
to look different
and to fail.
This script run without problems in the old server and I guess should
be something
in PHP.ini but I cannot find what is different.
Is there a setting in php.ini that can fix this?
Thank you!
Comment