I have a normal SELECT query such as
$result = mysql_query("SELECT * FROM table WHERE name = '$name2'");
Now some of the records have single quotes in them like dog's, cat's, etc. which is making those certain lines bring back errors. All the rest of the lines come back fine. Keep in mind that I can;t compare numbers/ids. I have to compare the two names because of how the tables are set up.
Is there an easy solution to this>