|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20287 "order by" syntax problem
Submitted: 2002-11-06 11:05 UTC Modified: 2002-11-06 11:11 UTC
From: otto at lanmetrix dot co dot za Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 4.2.1 OS: Win98/MySQL
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: otto at lanmetrix dot co dot za
New email:
PHP Version: OS:


 [2002-11-06 11:05 UTC] otto at lanmetrix dot co dot za
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"; 
$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?


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-06 11:11 UTC]
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Sep 29 14:05:55 2022 UTC