SET @last_id_in_books = LAST_INSERT_ID();

            INSERT INTO books_authors (bid, aid) values (@last_id_in_books, '$author');

            INSERT INTO books_types (bid, tid) values (@last_id_in_books, '$type');
last inserti 0 döndürüyornerede hata var acaba?