JamesCliff
Programmer
Hi all,
Im making a simple search script for my site.
I was going to try and incorporate the following simple code:
However i want to search multiple columns in 3 tables that i specify within the script. Im not to sure howto do this? All i want is 1 text box with the search button next to it, this box will pass the criteria to the query which will search the database. I can do this simple enough enough, but im not sure howto make the query search multiple tables and multiple columns within these tables with the keyword or words the user has entered.
All i need is abit of help with the forming the query. Writing the output code is easy.
Thanks alot
Jim
Im making a simple search script for my site.
I was going to try and incorporate the following simple code:
Code:
$query = "select * FROM table WHERE something like '%$keyword%' or something like '%$keyword%'";
$result = mysql_query($query) or die(mysql_error());
However i want to search multiple columns in 3 tables that i specify within the script. Im not to sure howto do this? All i want is 1 text box with the search button next to it, this box will pass the criteria to the query which will search the database. I can do this simple enough enough, but im not sure howto make the query search multiple tables and multiple columns within these tables with the keyword or words the user has entered.
All i need is abit of help with the forming the query. Writing the output code is easy.
Thanks alot
Jim