PhpDig.net

PhpDig.net (http://www.phpdig.net/forum/index.php)
-   Coding & Tutorials (http://www.phpdig.net/forum/forumdisplay.php?f=31)
-   -   help,i'm lost (http://www.phpdig.net/forum/showthread.php?t=2140)

lturton 09-06-2005 04:35 AM

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

Charter 09-07-2005 05:40 AM

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.

ruchit 09-25-2005 09:13 PM

TIP: avoid using mysql_fetch_array.. it is slower than both mysql_fetch_row & mysql_fetch_assoc


All times are GMT -8. The time now is 01:28 PM.

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