Unknown column 'gen' in 'where clause'--select * from chapters where book_id='692' and chapter_number=gen