Following is my table for artists -
id name sex
1 harsh male
2 geet female
Following is my table for events -
id artist_id created_by
2 2 16
2 2 17
Following is my query -
SELECT * FROM `events` WHERE artist_id IN (SELECT id FROM `artists` WHERE name LIKE '%$search_term%')
But apart from events data I need to get artist name in the result as well, please let me know what I need to change in my query as I tried *, artists.name
it wont worked.