Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Wednesday, November 11, 2026
About Us
Magazine
Open Source
CVS
Services
Index  »  Projects  »  phpMyEdit  »  Forum  »  Order by, with a field name containing spaces

phpMyEdit General     Order by, with a field name containing spaces
Post new topic   Reply to topic    
 
PatRaf     Joined: 26 Oct 2008   Posts: 2  
Post Posted: 2008-10-26 12:26
Back to top  Reply with quote     

Problem: in a ['values']['orderby'], I am using a field name containing spaces.
The routine set_values_from_table in phpMyEdit.class.php does not enclose the field name with $sd and $ed.
Hence an SQL error:

MySQL query at line 487
SELECT DISTINCT `Comptes-rendus-PH`.`Numéro compte-rendu` FROM `TESTSITAVOBE`.`Comptes-rendus-PH` ORDER BY Date de saisie
--------------------------------------------------------------------------------

MySQL error 1064

Workaround: enclose the field name in `` in the orderby clause:

['values']['orderby'] = '`field name`';

Second bug: impossible to file a bug report (memory allocated etc ...)

 
Post new topic   Reply to topic    

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Application form
Report bug on PLATON.SK website · Terms of use · Privacy policy