Re: variables
| From: | The Captain | Date: | Sat, 23 Sep 2000 08:27:09 +0000 |
| Subject: | Re: variables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-17570@lists.php.net to get a copy of this message | ||
your code looks strange. i'm not sure if you pasted it weird or what.
if ($action == "sort") {
$query = "SELECT * FROM $tableName ORDER BY $orderField " ;
} else if ($action == "pmg") {
$query = "SELECT * FROM $tableName WHERE model_category = $catField
";
}
Give that a go
----- Original Message -----
From: Wayne Michel <wayne@michel.com.au>
To: PHP List <php-general@lists.php.net>
Sent: Wednesday, September 20, 2000 12:00 AM
Subject: [PHP] variables
> Hi,
>
> I am new to PHP and am muddling through. However, I have stumbled and
would
> like assistance.
>
> I have the following lines of code:
>
> if ($action == "sort")
> {
> $query = "SELECT * FROM $tableName ORDER BY $orderField;" ;
> }
> if ($action == "pmg")
> {
> # $query = "SELECT * FROM $tableName WHERE model_category = $catField
>
> Entering the following URL works:
> catalogue.php?action=sort&orderField=Model
>
> Entering the following DOES NOT work:
> catalogue.php?action=pmg&catfield=Corgi
>
> Can some advise why?
>
> regards,
> Wayne
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>