You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'like = 1, dislike = 0 WHERE stato = 1' at line 1

Ciao ho questo errore in questa query e la cosa mi sembra strana perchè non mi sembra di aver fatto errori:

Codice PHP:
$querys mysql_query("UPDATE Stati_giud SET $tab = 1, $ot = 0 WHERE stato = $idpost") or die(mysql_error()); 
Questa query insieme a un'altra è contenuta in un else

Codice PHP:
$sql mysql_query("UPDATE Stati SET ".$tab."s = '1', ".$ot."s = '0' WHERE id='$idpost'") or die(mysql_error());
$querys mysql_query("UPDATE Stati_giud SET $tab = 1, $ot = 0 WHERE stato = $idpost") or die(mysql_error()); 
La prima funziona,ma la seconda no...come posso risolvere?