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
> 
> 

-- 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to