For the longest time, I\'ve been using the following basic formatting for SQL queries within my PHP:
$sql = \"SELECT * FROM `user-data` WHERE `id` = \'\".$id.\"\
Maybe it would make you a little happier at least to use PHP's string variable substitution:
$sql = "SELECT * FROM `user-data` WHERE `id` = '$id' LIMIT 1;";