2

Possible Duplicate:
Best way to test if a row exists in a MySQL table

I need to determine if a row exists at least once in table, where for example name = 'Jon'.

Is there is better solution than this?

 SELECT name FROM mytable
 WHERE name = 'Jon'
 LIMIT 1

and after receive count using num_rows.

Community
  • 1
  • 1
Oto Shavadze
  • 40,603
  • 55
  • 152
  • 236

0 Answers0