26, 2002 2:36 AM
To: <[EMAIL PROTECTED]>
Subject: Re: Trapping for no user input in a query
G'day Ron, all
> Tailor your query to the request of your user(s).
> if ($param1)
> $sql .= "(ad_copy) against ('$param1')";
> if ($param1 && $param2)
G'day Ron, all
> Tailor your query to the request of your user(s).
> if ($param1)
> $sql .= "(ad_copy) against ('$param1')";
> if ($param1 && $param2)
Thank you for your reply. If at all possible though, I'd like to do it from
the mysql side rather than the php side of things.
Is there su
Tailor your query to the request of your user(s). I.e. if only one
parameter was passed from the form only match against one field.
E.g.:
$sql = "SELECT ID, publication,run_date,left(ad_copy,40) as
Advertisement FROM classifieds WHERE MATCH ";
if ($param1)
$sql .= "(ad_copy) against ('