Re: [PHP] searching with mutable criteria

2004-12-07 Thread Christopher Fulton
An easy way to fix that problem would be to, instead of checking every time if one of the others also is not empty would be to do something like this (havn't tested this code, so no guarantees there's no typos). $sqlCondition = ""; if($_POST["state"] != "" || $_POST["types"] != "" || $_POST["

[PHP] searching with mutable criteria

2004-12-07 Thread Richard Kurth
I am having a problem with this script what it does is write the sql needed to search for data based on mutable criteria. It works fine if you search with all the different fields but if you only search with one or two of the fields it creates a sql that looks like this SELECT * FROM listing WHERE

[PHP] searching with mutable criteria

2004-12-06 Thread Richard Kurth
I am having a problem with this script what it does is write the sql needed to search for data based on mutable criteria. It works fine if you search with all the different fields but if you only search with one or two of the fields it creates a sql that looks like this SELECT * FROM listing WHERE