Du skal bruge tre separate SELECT'er (og sandsynligvis en jokertegnssøgning):
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
Hvis du returnerer kompatible resultater, kan du FORENE dem:
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