formfields.com Forum Index formfields.com
FORMfields Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Error in Column Sorting with TableHelpers::loadQuery()

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    formfields.com Forum Index -> TH 2.0 - Bug Reports
View previous topic :: View next topic  
Author Message
formfields



Joined: 01 Aug 2005
Posts: 465

PostPosted: Tue Dec 13, 2005 3:30 am    Post subject: Error in Column Sorting with TableHelpers::loadQuery() Reply with quote

While using column sorting with TableHelpers::loadQuery(), you may encounter an error like:
Code:

ERROR: You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax

to fix this, open /FORMfields/tableHelpers.php and replace the preg_match call in loadQuery():
Code:

preg_match("/(.*?)( *(LIMIT|PROCEDURE|FOR UPDATE|LOCK IN SHARE MODE) .*?)?$/i", $sql, $matches);

with:
Code:

preg_match("/^(.*?)( *(LIMIT|PROCEDURE|FOR UPDATE|LOCK IN SHARE MODE) .*?)?$/i", $sql, $matches);
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    formfields.com Forum Index -> TH 2.0 - Bug Reports All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group