Test Build: CUBRID 2008 R4.1 (8.4.1.1010) (64bit release build for linux_gnu)
OS: Linux 64
Description: Return value is not correct when passing a date parameter to cubrid_bind method
Repro steps:
1. execute: php bind_time_test.phpt
statements in bind_time_test.phpt
{noformat}
[php@NC-PL-QA014 _02_prepare]$ cat bind_time_test.phpt
?php
$conn = cubrid_connect(localhost, 33113, phpdb);
cubrid_execute($conn, 'DROP TABLE IF EXISTS time_tb');
$sql = EOD
CREATE TABLE time_tb(c1 string, time_tb time,date_t date);
EOD;
cubrid_execute($conn,$sql);
//date time type
$req = cubrid_prepare($conn, INSERT INTO time_tb VALUES('time date test',?,?););
cubrid_bind($req, 1, '02:22:22','time');
//cubrid_bind($req, 2, '08/14/1977');
cubrid_bind($req, 2, '08/14/1977','date');
cubrid_execute($req);
$req2= cubrid_execute($conn, SELECT * FROM time_tb where c1 like 'time%';);
if($req2){
$result = cubrid_fetch_assoc($req2);
var_dump($result);
cubrid_close_prepare($req2);
}
print 'Finished!';
cubrid_disconnect($conn);
?
{noformat}
Actual result:
{noformat}
array(3) {
[c1]=
string(14) time date test
[time_tb]=
string(8) 02:22:22
[date_t]=
string(10) 0000-00-00
}
{noformat}
Expect result:
{noformat}
array(3) {
[c1]=
string(14) time date test
[time_tb]=
string(8) 02:22:22
[date_t]=
string(10) 1977-08-14
}
{noformat}