Okay, I am abit confusing here. In my database I have 5 rows of this data => "[email protected]" (all lower case), and This is my code, Query 1 (I am using php and mysql):
$str = '[email protected]';
$sel = mysql_query("SELECT COUNT(*)
FROM table
WHERE `column` = '{$str}'");
$num = mysql_num_rows($sel);
echo $num;
The result is 1. But if I change to Query2
SELECT column
FROM table
WHERE `column` = '{$str}'"
It returns 5.
And another question is, which query should I use if i want to find out the number of rows exist in database, query 1 or 2, in term of query speed?