RE: [PHP-DB] Using PHP to generate SQL statement

2004-09-23 Thread Ed Lazor
> -Original Message- > Seems to me we've just answered a very similar question to this (and I'd > be > surprised it there weren't several relevant threads in the list archives). > Nonetheless: I was so tired last night that I don't even remember if I checked the archives first - my bad. T

Re: [PHP-DB] Using PHP to generate SQL statement

2004-09-23 Thread Eduardo Sampaio
Or you could use a more flexible way, allowing you to easily add other filters to the query. $sql = "select ID from products"; if ($webpage->parameter_isset("CategoryID")) $sql = addFilter($sql,"CategoryID",$webpage->CategoryID); if ($webpage->parameter_isset("CompanyID")) $sql = addFilter

RE: [PHP-DB] Using PHP to generate SQL statement

2004-09-23 Thread Ford, Mike
On 23 September 2004 07:47, Ed Lazor wrote: > I keep looking at the following code and thinking there's > gotta be a better > way. I've been in front of the computer all day tho and I'm drawing > a blank. Any ideas? Seems to me we've just answered a very similar question to this (and I'd be sur