#20287 [NEW]: "order by" syntax problem
| From: | otto at lanmetrix dot co dot za | Date: | Wed, 06 Nov 2002 17:05:21 +0000 |
| Subject: | #20287 [NEW]: "order by" syntax problem | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-24222@lists.php.net to get a copy of this message | ||
From: otto@lanmetrix.co.za
Operating system: Win98/MySQL
PHP version: 4.2.1
PHP Bug Type: MySQL related
Bug description: "order by" syntax problem
In the PHProjekt module "contacts_view.php" I wanted to sort the contacts
list by "firma" and then by "nachname".
I changed all instances of
$sort = "nachname";
to
$sort = "firma, nachname"; (note the space between arguments)
When modifying or creating a contact, and then returning to the contacts
list I get the error message:
"You have an error in your SQL syntax near 'ASC' at line 1"
I then removed the space like this:
$sort = "firma,nachname"; (no space)
This looks like a MySQL problem, but is it possible that PHP and/or
PHProjekt handles the space character to cause the error?
--
Edit bug report at http://bugs.php.net/?id=20287&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=20287&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=20287&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=20287&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=20287&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=20287&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=20287&r=support
Expected behavior: http://bugs.php.net/fix.php?id=20287&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=20287&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=20287&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=20287&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20287&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=20287&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=20287&r=isapi