MySQL Query : SELECT COUNT(*) as count FROM v9_gongkaike n left join v9_gongkaike_data p on n.id=p.id where catid=142 and n.status=99 and ( p.newkxtime > or p.newkxtime1 >= or p.newkxtime2 >= or p.newkxtime3 >= ) and `status` = '99' ORDER BY p.newkxtime ASC MySQL Error : 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 'or p.newkxtime1 >= or p.newkxtime2 >= or p.newkxtime3 >= ) and `status` = '99'' at line 1 MySQL Errno : 1064 Message : No database selected Need Help?