Search more than 1 table
Posted: Sun Mar 29, 2009 6:02 am
Hi, Im a bit new to PHP so bare with
I want to make my existing search code search more than 1 table, I have this:
how could I make it search a table called 'ailments' with fields called 'ailmentName', 'explanation' I've tried:
and i've tried a comma (,) Im not sure how to do this, can anyone help
thanx
I want to make my existing search code search more than 1 table, I have this:
Code: Select all
$query = "select * from herbs where herbName like \"%$trimmed%\" OR herbLatinName like \"%$trimmed%\"
order by herbName";Code: Select all
$query = "select * from herbs where herbName like \"%$trimmed%\" OR herbLatinName like \"%$trimmed%\"
order by herbName and select * from ailments where ailmentName like \"%$trimmed%\" OR explanation like \"%$trimmed%\"
order by ailmentName ";thanx