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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
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"; 
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

Pull Requests

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: Sat Dec 21 18:01:29 2024 UTC