> $query = "insert into user values ('firstname','lastname','address','phone')"; > $resultinsert = mysql_query($query); > > $getID = "select userID from user"; // Will this get me the > // Id of the record I just inserted? > $resultID = mysql_query($getID); No, it won't - it'll return every userID in the table. If your userIDs are sequential, you can just select "MAX(userID)" instead of userID. Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
- [PHP] Not quite relevant question about coding and query [EMAIL PROTECTED]
- Re: [PHP] Not quite relevant question about coding ... Shaun Thomas
- Re: [PHP] Not quite relevant question about coding ... Jason Murray
- Re: [PHP] Not quite relevant question about cod... [EMAIL PROTECTED]
- RE: [PHP] Not quite relevant question about cod... Dave Haggerty
- Re: [PHP] Not quite relevant question about coding ... php3
- Re: [PHP] Not quite relevant question about coding ... [EMAIL PROTECTED]
- Re: [PHP] Not quite relevant question about coding ... [EMAIL PROTECTED]
- Re: [PHP] Not quite relevant question about coding ... php3