php.net |  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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
34 - 14 = ?
Subscribe to this entry?

 
 [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"; 
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?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-06 11:11 UTC] tal@php.net
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 http://www.php.net/support.php 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: Fri Apr 26 15:01:56 2024 UTC