If you are storing your info in variables, then you don't need to bother with escaping. You can just write
$query = "insert into table values ('$val1', '$val2')";
If the info under $val1 and $val2 have single quotes in them, then they should show up fine in your DB.
If you hardcode the values in w/out variables, then you need to escape
$query = "insert into table values ('it\'s', 'it\'s')";
This is what I do and it works for me...hope it works for you.