Use $db->quote('*') instead of '*'