Re: Dynamic Queries

From: Date: Mon, 27 Nov 2000 08:30:29 +0000
Subject: Re: Dynamic Queries
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-27499@lists.php.net to get a copy of this message
I have no idea what all that means. Are you using MySQL for windows? try doing a sql dump that load that into windows... Chris Lee Mediawaveonline.com In article <kgq52t8tdeui3cil9fkgauimttci7neo2h@4ax.com>, NOSPAMjacksonjNOSPAM@calib.com wrote: > Hello, > > Newbie question. What's the best, most elegant way to write dynamic > queries? Keep in mind my background is in ColdFusion (and I'm using PHP3 > and MySQL). > > Obviously, this is NOT the way to do it, but it'll give you an idea of > what I'm up to: > > $str_sql = " > select * from pers_list2 WHERE > if (isset($fname)) { > fname = '$fname' > } > if (isset($fname) && isset($lname)) { AND > } > if (isset($lname)) { > lname = '$lname' > } > order by lname > "; > > Thanks very much, Jamie >

« previous php.general (#27499) next »