mysql_insert_id always returns zero

From: Date: Sun, 25 Jun 2000 14:23:23 +0000
Subject: mysql_insert_id always returns zero
Groups: php.general 
Request: Send a blank email to php-general+get-2998@lists.php.net to get a copy of this message
I have a working PHP insert snippet that creates records as desired; however, if I issue "echo mysql_insert_id();" immediately after the line that performs the insert, the result is always ZERO, even though a new record was created with an appropriately incremented id value. I'm sure it must be missing something stupid, but I can't seem to figure out what the stupid part is! Please drop me a note if you can suggest an answer. Environment: RH 6.2, Apache 1.3.12, MySQL 3.22.30, PHP 4.0 TIA. Dave Nuttall San Antonio, TX

« previous php.general (#2998) next »