Re: Re: Simple Search Logic Issue...
| From: | revDAVE | Date: | Sun, 15 Feb 2009 15:45:45 +0000 |
| Subject: | Re: Re: Simple Search Logic Issue... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-288282@lists.php.net to get a copy of this message | ||
On 2/15/2009 3:32 AM, "David Robley" <robleyd@aapt.net.au> wrote:
>
> LIKE '%c%' will match a field containing 'c' anywhere
>
> If you are using that syntax, I'd suggest echoing your query to make sure
> that it is as it should be; I'm wondering if you are actually enclosing
> string values in single quotes in your query?
Thanks David for your help....
The input form is basic like:
<input name="Message" type="text" value="">
Then dreamweaver cs3 created this
$mess_list1 = "-1";
if (isset($_GET['Message'])) {
$mess_list1 = $_GET['Message'];
}
... But it doesn't look like it does what you say : actually enclosing
string values in quotes....
Maybe ?:
$mess_list1 = '$_GET['Message']';
Not
$mess_list1 = $_GET['Message'];
???
>
> As for multiple selection criteria, you need to test whether the passed in
> value is set or not, and only include set values in the query.
Not sure - but isn't that what this code is doing ...???
$mess_list1 = "-1";
if (isset($_GET['Message'])) {
$mess_list1 = $_GET['Message'];
}
>
> OT: sprintf syntax is so hard to read :-)
I agree - especially for this newbie...
--
Thanks - RevDave
Cool @ hosting4days . com
[db-lists 09]