In message <[EMAIL PROTECTED]>, Wade <[EMAIL PROTECTED]> writes > >03142005 1116 GMT-6 > >I have been following the thread on last inserts. I am doing something >similar and have a question. > >$sql = "SELECT userid FROM users WHERE MAX(userid) AS userid"; > >Wouldnt this also get the last userid if it is called right after you >input your values?
A long way round - quicker would be SELECT Max(userid) FROM users But depending on the database used, there are often more efficient methods. And if there are multiple users, you could get the wrong one. -- Pete Clark http://www.hotcosta.com http://www.spanishholidaybookings.com Community email addresses: Post message: [email protected] Subscribe: [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] List owner: [EMAIL PROTECTED] Shortcut URL to this page: http://groups.yahoo.com/group/php-list Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-list/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
