MySQL uses backticks `` for names and single quotes ‘‘ for values. On the generated component I got form Cook, I noticed that the databases does not have any quote at all.
There is a recommended way to work with this situation, by adding $db->nameQuote($name) to embrace names or values... a database query would be like this:
$query = "
SELECT *
FROM ".$db->nameQuote('#__example_table')."
WHERE ".$db->nameQuote('id')." = ".$db->quote('999999').";
";
I think this would be a good thing to be added to follow the standards and avoid compatibility issues...