Hey there,
I am having difficulties getting my head round searching...I have hit a loop in my head where i cannot see what i know is an easy answer.
here is my problem. I am designing a new website for a modelling agency, and i want them to be able to search for a partiqular model. At the moment they can search for a specific model i.e. a male model from the male_models table, or a female model from the female_models table from their respective pages.
What i would like to do is search for models by their name ('name' in database tables) but in both tables.
This basic code works for the individual search:
SELECT * FROM $table WHERE name LIKE '%$SearchResult%'
But i need it to be for both tables. I think it has something to do with Joins, and i have tried the following code but with many duplications.
SELECT * FROM male_models, female_models WHERE male_models.name OR female_models.name LIKE '%$SearchResult%'
but this did not work.
Can someone please give me some assistance
Thanks
Enormousrodent