Anda memerlukan tiga SELECT terpisah (dan mungkin pencarian wildcard):
SELECT *
FROM tbl_books
WHERE title LIKE '%law%'
LIMIT 0,30
SELECT *
FROM tbl_books_author
WHERE title LIKE '%law%'
LIMIT 0,30
SELECT *
FROM tbl_books_subject
WHERE title LIKE '%law%'
LIMIT 0,30
Jika Anda mengembalikan hasil yang kompatibel, Anda dapat MENYATAKAN mereka:
SELECT 'book ', title
FROM tbl_books
WHERE title LIKE '%law%'
UNION ALL
SELECT 'author ', author
FROM tbl_books_author
WHERE title LIKE '%law%'
UNION ALL
SELECT 'subject', subject
FROM tbl_books_subject
WHERE title LIKE '%law%'
LIMIT 0,30