Exclusive eBooks, Software Solutions, Quality Guaranteed
Web NukeBiz
Welcome to NukeBiz · Members
of 6

 #32 » Treasury 9.3.1 - Donation Block
 Date Open: May 02, 2008 at 14:49:05    Last Update: May 02, 2008 at 16:42:19 Bugger Off: May 02, 2008 at 16:42:19 
 Description: Block generates the following error if all DonorMeter Config options are set to "No"

CMS Warning line 75: On /cpgn2/index.php While executing query " SELECT user_id, custom AS name, option_selection1 as showname, mc_currency AS currency, currency_symbol AS symbol, settle_amount AS settled, FROM_UNIXTIME( payment_date, '%b-%e' ) AS date, SUM(ROUND(mc_gross,2)) AS amt FROM prefix_treas_trans WHERE AND (payment_status = 'Completed' OR payment_status = 'Refunded') GROUP BY txn_id ORDER BY payment_date DESC LIMIT 5" the following error occured: 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 'AND (payment_status = 'Completed' OR payment_status = 'Refunded') GROUP BY tx' at line 4 In: /path/cpgn2/blocks/block-Donat_o_Meter.php on line: 152

I believe the problem lies with the "WHERE AND" syntax!
 Request: Bug
 Application: Block
 Module: treasury
 Solution: Poorly located $where variable now relocated, plus some undefined indexes fixed that arose from setting those options.

Updated block attachment available in this topic:
 Bugger From: BadCO
 Debugger: Phoenix
 Group Access: All Visitors
 DiscussIt Forum: Treasury and Supporters
 DiscussIt Topic: Treasury 9.3.1 - Donation Block
 Status: Done
 Priority: High
 Topic Replies:
 May 02, 2008
Damn - figures that you guys would find it - will investigate.

IC the problem - stupid me defined the $where variable inside the display options so if you suppress them, $where doesn't get defined Doh

That issue also generates a couple of undefined indexes which are now also fixed.

I've updated the download and the amended block attached here,
 May 03, 2008
I'm very sorry for being difficult! Rolling Eyes

Thanks, as always, for your ultra speedy response - works like a dream now.
150 buggers listed, 109 buggered off, 31 declined, 8 on hold.