$this->db->query("select * from bookshelf,book where uni_id='".$data['unid']."' and book.bookcate_id = '".$data['cate_id']."'
and book.book_id = bookshelf.book_id");
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 ''9' AND `book`.`bookcate_id=` '15' LIMIT 12' at line 4
SELECT * FROM (`bookshelf`) JOIN `book` ON `bookshelf`.`book_id` = `book`.`book_id` WHERE `uni_id=` '9' AND `book`.`bookcate_id=` '15' LIMIT 12