Boa tarde, estou precisando usar o AND na query mas estou recebendo o seguinte erro:
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 'AND `task_list`.`responsavel` = 2 ORDER BY id DESC' at line 1.
O código é:
$sql = "select * from `task_list` where `task_list`.`status` = ".$_REQUEST["status"]." AND `task_list`.`responsavel` = ".$_REQUEST["user"]." ORDER BY id DESC";
$query = mysql_query($sql) or die (mysql_error());
$resultado = mysql_num_rows($query);
O status e o user estão sendo enviados corretamente, oque pode ser??
Ricardo CrivelliDelphi Developer Certified
CobiT Foundation 4.1 Certified
@ricocrivelli4Bytes Inc. - Desenvolvimento de sistemas especialistas web.