php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #57093 Support for the Informix SERIAL datatype
Submitted: 2006-06-16 09:04 UTC Modified: 2006-06-22 01:13 UTC
From: jgp at jgp dot net Assigned: kfbombar (profile)
Status: Closed Package: PDO_INFORMIX (PECL)
PHP Version: Irrelevant OS: All
Private report: No CVE-ID: None
 [2006-06-16 09:04 UTC] jgp at jgp dot net
Description:
------------
Support for the SERIAL datatype using PDO

Reproduce code:
---------------
$db = new PDO( 
"informix:host=xeo;service=1526;database=stores_demo;server=ol_xeo;protocol=olsoctcp;EnableScrollableCursors=1;DB_LOCALE=EN_US.8859-1"/* connection string */ , 
"informix"/* user */ , 
"informix"/* password */); 

$insstmt = 'insert into customer(customer_num, fname, lname, company) values(?, ?, ?, ?);'; 

$stmt = $db->prepare($insstmt); 

$dataarray = array('0', 'Jean Georges', 'Perrin', 'None'); 
$result = $stmt->execute($dataarray); 

if ($result == true) { 
echo ("Row successfully insterted, customer #" . $db->lastInsertId()); 
}

Expected result:
----------------
PDO::lastInsertId() should *NOT* return: 
SQLSTATE[IM001]: Driver does not support this function: driver does not support lastInsertId() in xxx

It should return the correct value of the SERIAL.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-06-22 01:13 UTC] kfbombar at us dot ibm dot com
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.

This feature is now in CVS Head.  There is also a test added to view simple usage: fvt_019.phpt.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu Jun 20 07:01:25 2019 UTC