PhpDig.net

Go Back   PhpDig.net > General Forums > Coding & Tutorials

Reply
 
Thread Tools
Old 09-06-2005, 04:35 AM   #1
lturton
Green Mole
 
Join Date: Sep 2005
Posts: 1
help,i'm lost

i've got this web page which can search by one category, but i need it to search by at 3, there are 3 text fields taking info and a submit button, results must be shown on the same page help
lturton is offline   Reply With Quote
Old 09-07-2005, 05:40 AM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
In the script, after you clean/slash the form variables, edit the query so it has something like the following in it:
Code:
SELECT var1,var2,var3 FROM table WHERE var1 LIKE '%$var1%' OR var2 LIKE '%$var2%' OR var3 LIKE '%$var3%'
Then in the mysql_fetch_array part of the code, edit it for the new variables. There are some examples here.
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote
Old 09-25-2005, 09:13 PM   #3
ruchit
Green Mole
 
Join Date: Sep 2005
Posts: 3
TIP: avoid using mysql_fetch_array.. it is slower than both mysql_fetch_row & mysql_fetch_assoc
__________________
work together - make world a better place
http://outsource-to-india.com
ruchit is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
install error..im lost ?!? drakendk Script Installation 1 03-23-2004 12:38 AM


All times are GMT -8. The time now is 06:35 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.