Update table in wrong format

Asked

Viewed 28 times

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 on the field pontuacao of id=$x only if the $data is less than the figure in diadojogo, which is a sweep format '2017-09-28'.

1 answer

1


update palpite set pontuacao='4' where (id='1' and diadojogo > '2017-09-26');
  • 1

    That’s the answer to your question?

  • Yes! That’s the answer to my question!

  • He that she is very similar to the question, careful not to take unnecessary negative, gives an explanation! is just a hint!

  • It is similar, but the answer is correct. You find it necessary to delete?

  • No, I don’t think so, it was just a warning ...

  • Exclude no, but explain what the difference of the answer to the expression of the question and explain why one works and the other does not. This will increase the quality of the answer.

Show 1 more comment

Browser other questions tagged

You are not signed in. Login or sign up in order to post.