|  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
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-2024 The PHP Group
All rights reserved.
Last updated: Thu Jun 13 21:01:33 2024 UTC