View Single Post
Old 02-20-2013, 09:43 PM   PM User | #5
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,187
Thanks: 59
Thanked 3,995 Times in 3,964 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Try it both with and without the LIMIT 1 and see if your results are any different.

If they are--with that query written as is--I owe you a latte.

You only use LIMIT when your query is going to return more records than you want.

And in any case, a LIMIT used *WITHOUT* and ORDER BY clause is worse than useless.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote