mysql_insert_id

From: Date: Thu, 29 Jun 2000 01:45:59 +0000
Subject: mysql_insert_id
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-3710@lists.php.net to get a copy of this message
I want to use mysql_insert_id but an error occurs: THE CODE I USE IS THE FOLLOWING: mysql_connect("$DBHost","$DBUser","$DBPass"); $queryz = "INSERT INTO messaggi values('','text','21','','$REMOTE_ADDR','1','','')"; echo $queryz; $result1=mysql( "$DBName", "$queryz"); $serialID = mysql_insert_id($result1); Note: the query is performed (ie: a new record is added) but I get the error: Warning: 0 is not a MySQL link index in c:\programmi\apache group\apache\htdocs/biz/testdate.php3 on line 7.. Can anybody tell me the proper sintax in order to get the last id? Thanks Nicola Delbono

« previous php.general (#3710) next »