query < SELECT count(*) as total FROM books A LEFT JOIN book_join B ON A.seq = B.book_num WHERE B.cate_num= AND A.best='T' > error (count : 1 ) : 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 A.best='T'' at line 1