What version of DBI are you using on the box this doesn't work on ??

>>On 12 Jul 2002 15:40:12 -0400, Keith Jackson <[EMAIL PROTECTED]>   wrote:

>>I've use the mysql_insertid function on many different boxes but I am
>>now having a problem.
>>
>>The following script works fine on every box I've tried except one:
>>
>>
>>use DBI;
>>$driver = "mysql";
>>$drh = DBI->install_driver($driver);
>>$dsn = "DBI:$driver:database=test";
>>$dbh = DBI->connect($dsn,"root");
>>$dbh->do(qq(insert into testac values ("","test")));
>>print "id=".$dbh->{'mysql_insertid'}."\n";
>>
>>
>>This script inserts a record and prints the id from the auto_increment
>>field.  On the ONE box it doesn't work on, it prints 0 even though the
>>record is inserted and the id field is correctly incremented.  I've
>>tried different tables just to make sure there was not an error in my
>>table.

Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel: 1(985)902-8484
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Reply via email to