debug it by putting some odd characters here
[]
$query = "SELECT $Query FROM {$config['tbprefix']}Users WHERE U_Number = '$Uid' <insert odd charceter>";
[/]
then look at the select that is trying to pass.. if it doesn't look like a good formatted select then it may cause this error. Also $Query == $query on some servers so I would advise to use something else for the $Query something like $Myquery instead of the $Query