* Brief:
** The PDO driver doesn't support prepare and query function for CUBRID shard db
* Test Code (case - apis_550.zip):
{code}
?php
$database =shard1;
$host =localhost;
$port =45061;
$username =shard;
$password =shard123;
try{
$conn_str =cubrid:dbname=.$database.;host=.$host.;port=.$port;
$db = new PDO($conn_str, $username, $password );
echo PDO connection created ok!.\n;
$stmt = $db-prepare('SELECT * FROM tbl WHERE id = /*+ shard_id(0) */ ?');
if(!$stmt){
echo Prepare Failed! ;
}
$query_stmt = $db-query('SELECT * FROM tbl WHERE id = /*+ shard_id(0) */ 1');
if(!$query_stmt){
echo Query Failed! ;
}
}
catch(PDOException $e){
echoError: .$e-getMessage().;
}
?
{code}
* Result: Prepare Failed Query Failed
* Summary: PDO 'prepare' and 'query' functions are not working properly in CUBRID shard DB
* Reference: http://www.cubrid.org/cubrid_pdo_driver