Printer Friendly Version Print this thread
Email this thread to a friend eMail this thread to a friend
Related Forum Posts
  1. Interesting question... (In: General Search Engine Optimization)
  2. 301 redirect question from stinkysgti (In: General Search Engine Optimization)
Featured Web Site Template

Hundreds More at Free Site Templates.com!

Web Site Partners
Sponsored Links
Jet City Software
 
Whos Here ?
Reflects user activity within the last 5 minutes
Moderator(s): Prowler, jcokos
Member Message

leelee700
Joined: Oct 09, 2006
# Posts: 50

View the profile for leelee700 Send leelee700 a private message

Posted: 12/10/2006 02:51 pm
Edit Message Delete Message Reply to this message

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

View the profile for leelee700 Send leelee700 a private message

Posted: 12/13/2006 05:12 am
Edit Message Delete Message Reply to this message

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

View the profile for Prowler Send Prowler a private message

Posted: 12/15/2006 08:13 pm
Edit Message Delete Message Reply to this message

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:
  1. You have not yet logged in, or registered properly as a member
  2. You are a member, but no longer have posting rights.
  3. 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

New posts Forum is locked
© 1995  ·  iWeb, Inc  ·  DBA JimWorld Productions