Re: [PHP-DB] Question on the use of where statements

2004-12-01 Thread Stuart Felenstein
Sorry ..hit the wrong button --- Stuart Felenstein [EMAIL PROTECTED] wrote: I posted this over on mysql list. Not trying to be redundant, but would like to get some feedback. Basically I'm wondering. I am creating a search form , dynamic query, that could potentially have in the area of

RE: [PHP-DB] Question on the use of where statements

2004-12-01 Thread Bastien Koert
so...best to build the statement dynamically and execute it once only if the input box has a value in it... $sql = select * from table where 1 ; if (isset($_POST['field1'])){ $sql .= and column1 = '.$_POST['field1']. '; ... if (isset($_POST['fieldN'])){ $sql .= and columnN =

RE: [PHP-DB] Question on the use of where statements

2004-12-01 Thread Stuart Felenstein
--- Bastien Koert [EMAIL PROTECTED] wrote: so...best to build the statement dynamically and execute it once only if the input box has a value in it... And that is the way I'm building it. Just thinking about the scenario that somone actually chooses 75% of the options - would that

RE: [PHP-DB] Question on the use of where statements

2004-12-01 Thread Gryffyn, Trevor
of SELECT statement. If you find anything interesting, let us know. Sorry couldn't give you a better answer. -TG -Original Message- From: Stuart Felenstein [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 01, 2004 10:56 AM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] Question on the use

RE: [PHP-DB] Question on the use of where statements

2004-12-01 Thread Bastien Koert
] Question on the use of where statements Date: Wed, 1 Dec 2004 07:55:35 -0800 (PST) --- Bastien Koert [EMAIL PROTECTED] wrote: so...best to build the statement dynamically and execute it once only if the input box has a value in it... And that is the way I'm building it. Just thinking about