tam yazıyodum cevabı

teşekkürler yine de
@tork;
Çözüm dediğin gibi ;
INSERT INTO books (title, description) values ('$title', '$description');
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');