Coding is much easier than you think
Posted by Mohaideen Jamil in MySQL
1) select 1 from table where key = value; 2) select count(1) from table where key = value;
The first alternative should give you no result or one result, the second count should be zero or one.