bugfix: don't perform empty SQL query

MySQL was complaining about empty query when PDO
was created with option PDO::ATTR_EMULATE_PREPARES => false