Wasn't it something like:
Select NAME from books, magazines WERE name LIKE %php programming%
Although I might be wrong, the answer is basic SQL.
Just open a sql book in a local library and it wil be something like I wrote. I will be written in the first 2 paragraph.
Greetings,
and just like me... practise!