Update table in wrong format

1
update table set pontuacao='$var1' where id='1' AND diadojogo > '2017-09-28';
update table set pontuacao='$var1' where id='1' AND diadojogo >  2017-09-28 ;
update table set pontuacao='$var1' where id='1' AND diadojogo > '$data';

I know this syntax is wrong! I want to save the var1 in the field pontuacao of the id=$x only if the $data is less than that contained in diadojogo , which is a varchar format '2017-09-28' . p>     

asked by anonymous 29.09.2017 / 01:53

1 answer

1
update palpite set pontuacao='4' where (id='1' and diadojogo > '2017-09-26');
    
29.09.2017 / 02:05