Page 1 of 1

[Solved] Custom module broken in 1.9.4

Posted: Mon May 30, 2011 7:43 pm
by kissack
I have a bespoke custom written module that worked fine till upgrading to 1.9.4. The module uses a sql query to get data for a family tree page. The results were blank.

I couldnt find an answer with google or searching the forum, but eventually tracked down the answer....

The sql query was pretty basic ($sql = 'SELECT * FROM ' . cms_db_prefix(). 'tree WHERE (html = \''. $params['ftpg'] . '\') ;';) and after a painfully slow debugging session I traced the change (in 1.9.4) to the file /var/www/DMZ/kissack/lib/adodb_lite/generic_modules/pear_module.inc This now includes a search for 'LIMIT' presumably as a security addition (?) in GetRow

The fix was to adjust my query to $sql = 'SELECT * FROM ' . cms_db_prefix(). 'tree WHERE (html = \''. $params['ftpg'] . '\') LIMIT 1 ;';

--
Allan