Re: [PHP-DB] Query with optional params

2003-01-05 Thread David Smith
Rich, When I do searches with multiple fields, I construct the SQL string on the PHP side. You can do something like this: $sql = SELECT * FROM docmeta WHERE ; if( $PartNumber ) $sql .= PartNumber='$PartNumber'; if( $Title ) $sql .= AND Title='$Title'; and so on... That has

RE: [PHP-DB] Query with optional params

2003-01-05 Thread Rich Hutchins
] Subject: Re: [PHP-DB] Query with optional params Rich, When I do searches with multiple fields, I construct the SQL string on the PHP side. You can do something like this: $sql = SELECT * FROM docmeta WHERE ; if( $PartNumber ) $sql .= PartNumber='$PartNumber'; if( $Title