I have two different approaches to check for an existing entry.
Approach 1
SQL: SELECT COUNT(*) FROM ...
PHP:
$result = fetch_row();
if($result[0] > 0) // entry found
Approach 2
SQL: SELECT 1 FROM ... LIMIT 1
PHP:
$result = num_rows();
if($result > 0) // entry found
What is the right way to do it in terms of performance?