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 'rang_level.rang_id='1'AND book.sub_id='1'AND book.rang_id=rang_level.rang_id AND' at line 1 [SELECT * FROM book, rang_level, subject, tutor_pd WHERE 1AND rang_level.rang_id='1'AND book.sub_id='1'AND book.rang_id=rang_level.rang_id AND book.sub_id=subject.sub_id AND book.tut_id=tutor_pd.tut_id ORDER BY book.b_id ASC]