[PHP Driver] php driver have not throw exceptions when execute sql used invalid parameters for prepare sql.
The values are not changed , but there are no error messages given out.
Test version:
{noformat}Test verion:
Cubrid: CUBRID 9.0 (9.0.0.0455)
PHP Driver:
http://svn.cubrid.org/cubridapis/php/branches/RB-9.0.0 Revision: 867
{noformat}
The codes:
{noformat}
//prepare
$sql = prepare x from 'update enum032 set e3=? where id=1';
$req = cubrid_prepare($conn, $sql, CUBRID_INCLUDE_OID);
//cubrid_execute($req);
//execute
$sql = execute x using -1;
cubrid_execute($req);
if (!$req) {
printf([001] [%d] %s\n, cubrid_errno($conn), cubrid_error($conn));
}
// select
$sql = select * from enum032 order by id;
$req = cubrid_prepare($conn, $sql, CUBRID_INCLUDE_OID);
cubrid_execute($req);
$column_names1 = cubrid_column_names($req);
$column_types1 = cubrid_column_types($req);
$size = count($column_names1);
print(*****************************************\n);
for($i = 0; $i $size; $i++) {
printf(%-30s, $column_names1[$i]);
}
print(\n);
while($row = cubrid_fetch_row($req)){
for($i = 0; $i $size; $i++) {
printf(%-30s, $row[$i]);
}
print(\n);
}
$sql = execute x using null;
cubrid_execute($req);
// select
$sql = select * from enum032 order by id;
$req = cubrid_prepare($conn, $sql, CUBRID_INCLUDE_OID);
cubrid_execute($req);
if (!$req) {
printf([001] [%d] %s\n, cubrid_errno($conn), cubrid_error($conn));
}
$column_names1 = cubrid_column_names($req);
$column_types1 = cubrid_column_types($req);
$size = count($column_names1);
print(*****************************************\n);
for($i = 0; $i $size; $i++) {
printf(%-30s, $column_names1[$i]);
}
print(\n);
while($row = cubrid_fetch_row($req)){
for($i = 0; $i $size; $i++) {
printf(%-30s, $row[$i]);
}
print(\n);
}
{noformat}
Test Result:
{noformat}
*************Before Execute*******************
id e2 e3 e4
1 Yes Sunday x
6 Yes Wednesday z
*******************After Execute using -1****************
id e2 e3 e4
1 Yes Sunday x
6 Yes Wednesday z
****************After Excute using NULL****************
id e2 e3 e4
1 Yes Sunday x
6 Yes Wednesday z
{noformat}