Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Thursday, November 12, 2026
About Us
Magazine
Open Source
CVS
Services
Index  »  Projects  »  phpMyEdit  »  Bug list  »  Bug #452

Viewing Bug Advanced Details [ Jump to Bugnotes ] [ Bug History ] [ Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000452 core / field option minor always 2007-09-06 05:56 2007-09-06 05:56
 
Reporter chriss4242 View Status public  
Assigned To
Priority normal Resolution open Platform
Status new Duplicate ID OS
Projection none Version
ETA none Product Version 5.7 (stable)
  Product Build
  Votes 1
 
Summary "Number of records to display on the screen" doesn't appear to work.
Description When "$opts['inc'] = 15;" is set, the page returns with a 1064 sql error:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 0, 15' at line 1

The query being executed was:

SELECT `PMEtable0`.`scriptname` AS `qf0`,`PMEtable0`.`version` AS `qf1`,`PMEtable0`.`date` AS `qf2`,`PMEtable0`.`priority` AS `qf3`,`PMEtable0`.`description` AS `qf4`,`PMEtable0`.`id` AS `qf5` FROM `current_versions` AS `PMEtable0` ORDER BY `PMEtable0`.`id` LIMIT LIMIT 0, 153.735 miliseconds

Steps To Reproduce Use "phpMyEditSetup.php" to create a form using default of 15 lines per screen.
I get the above error.
Redo form with unlimited lines per page and everything works as expected.
Apply fix below and everything works as expected.
Additional Information / Solution When I had a look at the code, the LIMIT construct appears to being set in two locations - Line 358 and also 570 in phpMyEdit.class.php. (Both when constructing the query and also in the parts being placed into the query.

I made the following change to remove it from one of the locations and it appears to work correctly now:

[xxx@xxx phpMyEdit-5.7]# diff phpMyEdit.class.php phpMyEdit.class.php.mod
358c358,363
< return ' LIMIT '.$start.', '.$more.' ';
---
> /* Modified by CJS. parts['limit'] appears to add "LIMIT" and so does the main query constructor. Result was
> limit being included twice. Modified here so that the query parts does not ad LIMIT key word.
>
> return ' LIMIT '.$start.', '.$more.' ';
> */
> return $start.', '.$more.' ';
[xxx@xxx phpMyEdit-5.7]#

Hope this helps.
Attached Files

There are no notes attached to this bug.

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