You may be only expecting one and only one row, but you should always check if more than one row was retrieved for whatever reason. If more than one row was retrieved, something went wrong and you should code accordingly. That said, you are interested in the LIMIT clause that someone else on the list already mentioned. Although I would set a LIMIT 2, which would allow you to check if more than one row was retrieved. I only use LIMIT 1 when I am deleting and I only expect to be deleting only one record. That way a coding error won't suddenly delete the whole database.
On Sunday, September 15, 2002, at 09:08 PM, Tim Johnson wrote: > However, since I'm just retrieving one and only one row, is > there a query (like find-first) that would be more efficient? > -- Brent Baisley Systems Architect Landover Associates, Inc. Search & Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577 --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php