Details
Description
[PHP] sql statment contained "prepare" can not execute using method "cubrid_execute".
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
Test codes:
//prepare
$sql = "prepare x from 'update enum032 set e3=? where id=1'";
$req = cubrid_prepare($conn, $sql, CUBRID_INCLUDE_OID);
cubrid_execute($req);
if (!$req) {
printf("[001] [%d] %s\n", cubrid_errno($conn), cubrid_error($conn));
}
//execute
$sql = "execute x using -1";
$req = cubrid_prepare($conn, $sql, CUBRID_INCLUDE_OID);
cubrid_execute($req);
if (!$req) {
printf("[001] [%d] %s\n", cubrid_errno($conn), cubrid_error($conn));
}
Test result:
Warning: Error: DBMS, -995, A prepared statement with the name x does not exist. in /home/php/phptestcases/php/php/_18_enum/enum_prepare_01.php on line 43 Warning: cubrid_execute() expects parameter 1 to be resource, boolean given in /home/php/phptestcases/php/php/_18_enum/enum_prepare_01.php on line 44 [001] [-995] A prepared statement with the name x does not exist.
These two sql statment can execute in csql :
csql> prepare x from 'update enum032 set e3=? where id=1'; Current transaction has been committed. 1 command(s) successfully processed. csql> execute x using -1; In the command from line 1, ERROR: Cannot coerce value of domain "integer" to domain "enum". 0 command(s) successfully processed. csql>
Issue Links
- clones
-
APIS-350
CLONE - [Perl] sql statment contained "prepare" can not execute using method "cubrid_execute"
-
Perl has same question:
Repro steps:
Please run the pl file in attachment.