Printer Friendly Version
Email this thread to a friend
|
Featured Web Site Template |
|
Reflects user activity within the last 5 minutes
|
|
| Member |
Message |
leelee700
Joined: Oct 09, 2006
# Posts: 50
|
Posted: 12/10/2006 02:51 pm
hi - i am developing a site where users search for something by typing in their querry into a search box, which calls a php script that querries a database to return a result.
now i have no trouble when i want the user's querry to be checked against a particular column in the database, but how can i get the querry to be checked by multiple columns?
below is the code for one column:
$query = "select * from $usertable where $table_field1 like "%$trimmed%"
order by $table_fieldl";
can someone tell me how can the users' querry be checked against more than one column (note: $table_field1 is used here to denote one of my database columns).
thanks!
|
 |
leelee700
Joined: Oct 09, 2006
# Posts: 50
|
Posted: 12/13/2006 05:12 am
hi - wonder if anyone can give me a helping hand here? ive tried everythign i can think of with no luck. all im trying to do is search multiple colums in my mysql database. my code works for just one column, but not 2 or more.
if anyone can offer some advice or helping hand, id really appreciate it. basically, i just need the code to search multiple columns that i specify when a user types something into a search box.
thanks!
|
 |
Prowler
Moderator
Joined: Aug 14, 2000
# Posts: 1720
|
Posted: 12/15/2006 08:13 pm
Perhaps this tutorial can help : [link]
|
 |
You are not permitted to post messages in this forum or topic, because of one or more of the following reasons:
- You have not yet logged in, or registered properly as a member
- You are a member, but no longer have posting rights.
- This is a private forum, for which you do not have permissions.
If you are a recent member, it's possible that you simply have not yet confirmed your account. Please
check your email for a message entitled 'JimWorld Forums: Confirm Your Account' and follow the instructions
contained within.
If you cannot find this message, click here to Re-Send it.
|
If you are still experiencing problem, please read the
Login Assistance
Article for some advice on what may be causing your login not to work properly.
|
Switch to Advanced Editor and ...
Create a New Topic
or Reply to this Thread
|
|