Re: Is the syntax correct?
| From: | Ben Ramsey | Date: | Tue, 12 Apr 2005 14:21:09 +0000 |
| Subject: | Re: Is the syntax correct? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-212917@lists.php.net to get a copy of this message | ||
Labunski wrote:
Is the syntax correct? (in connection with $order) :Nope. You need some semicolons (;). So, these would become: $order = "DESC"; $order = "ASC";
switch ($page) { case "news":The rest of it looks fine to me. -- Ben Ramsey http://benramsey.com/$order = "DESC" break;case "articles":$order = "ASC" break;} mysql_query(" SELECT * FROM data ORDER BY id $order ");