Re: mysql quickie..

From: Date: Wed, 17 Apr 2002 18:06:13 +0000
Subject: Re: mysql quickie..
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-93364@lists.php.net to get a copy of this message
Kelly- My way may not be perfect, but this is what I do..... $sql_temp = "select last_insert_id() as mainid from transfers"; $sql_result_temp = mysql_query($sql_temp,$connection); $row_temp = mysql_fetch_array($sql_result_temp); $file_temp_id = $row_temp["mainid"]; -Scott On Wed, 17 Apr 2002, Kelly Meeks wrote: > Hi folks, > > I need to get the next auto_increment value of a mysql table thru php. > > Looking at my mysql manual, it makes reference to a last_insert_id() function? > > How would I use this via php, or is there some other way to do it? > > Thanks > > Kelly > > --

« previous php.general (#93364) next »