Re: [PHP] mysql quickie..

2002-04-17 Thread Richard Emery
- Original Message - From: Robert Cummings <[EMAIL PROTECTED]> To: Richard Emery <[EMAIL PROTECTED]> Cc: Kelly Meeks <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, April 17, 2002 1:49 PM Subject: Re: [PHP] mysql quickie.. Richard Emery wrote: >>

Re: [PHP] mysql quickie..

2002-04-17 Thread Robert Cummings
Richard Emery wrote: > > I've seen other responses to your request answer with some VERY UGLY methods > to get the last id. Hey my method wasn't ugly, perhaps not optimal, but definately not ugly! So *ptht* ;) > Instead, use mysql_insert_id() which was created specifically for the info > yo

Re: [PHP] mysql quickie..

2002-04-17 Thread Richard Emery
Wednesday, April 17, 2002 1:15 PM Subject: [PHP] mysql quickie.. 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 i

Re: [PHP] mysql quickie..

2002-04-17 Thread Robert Cummings
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? Quickly and hardly accurately..

Re: [PHP] mysql quickie..

2002-04-17 Thread Scott St. John
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 200

[PHP] mysql quickie..

2002-04-17 Thread Kelly Meeks
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/) T