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 sender_id=20237 AND readstatus=0 AND isreply=0 AND del_user=0 AND del_sender' at line 1select mesage_id,message from mail_box where user_id= AND sender_id=20237 AND readstatus=0 AND isreply=0 AND del_user=0 AND del_sender=0 order by mesage_id Desc