query exact match in database

I’m searching for an exact case sensitive match in a database, but search is yielding multiple results
[php]
$search = mysql_real_escape_string($_POST[‘search’]);
$sql=“SELECT * FROM my_test_db WHERE name=’$search’”;
$result=mysql_query($sql) or die(mysql_error());
$count=mysql_num_rows($result);

if ($count == 1) {
echo “ZOMG IT WORKS”;
} else {
echo $count;
}
[/php]

yields “2”
if i have
name and Name in database.

I want it to result in $count = 1 if $search = Name. Any ideas?

never mind i fixed it. DERP

Sponsor our Newsletter | Privacy Policy | Terms of Service