Fixed queries (table prefix and constants)

Fixed: common-queries.php