Query could not be executed!

faulty query
$query