![]() |
|
printMostPopularItems() incorrect MySQL syntax - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: Plugins (https://forum.zenphoto.org/forum-6.html) +--- Thread: printMostPopularItems() incorrect MySQL syntax (/thread-7293.html) |
printMostPopularItems() incorrect MySQL syntax - rjscotland - 04-07-2010 Hi, I'm trying to make use of the printMostPopularItems() function in Zenpage. I'm having no luck as it just generates the following error:
This occurs on a FreeBSD box (Apache) running MySQL 5.0.51a and also a Windows box (Apache) running MySQL 5.1.30. Unfortunately as I'm no MySQL guru I'm not sure where to start looking to debug it. Perhaps it'll be blindingly obvious to someone. Cheers! printMostPopularItems() incorrect MySQL syntax - kagutsuchi - 04-07-2010 What version of Zenphoto are you running? printMostPopularItems() incorrect MySQL syntax - rjscotland - 04-07-2010 I'm running 1.3 (5479). printMostPopularItems() incorrect MySQL syntax - sbillard - 05-07-2010 Could you post the actual code where you call printMostPopularItems()? Most likely this is caused by a parameter error. printMostPopularItems() incorrect MySQL syntax - acrylian - 05-07-2010 I can confirm that a bug sneaked into that function. It will be corrected in the svn soon. printMostPopularItems() incorrect MySQL syntax - rjscotland - 05-07-2010 Ah that's good to hear . Thanks a lot for your help! Is it a quick fix? As in, can I edit the function myself to get it working in my current installation? Cheers printMostPopularItems() incorrect MySQL syntax - acrylian - 05-07-2010 Well, look at the function at the switch at the beginning. It checks $option but should actually check $mode. printMostPopularItems() incorrect MySQL syntax - rjscotland - 05-07-2010 I've tweaked it... ` ... Thanks a lot for that, well spotted! On a side note, it would be nice if the printZenageStatistic() that the printMostPopularItems() uses didn't add printMostPopularItems() incorrect MySQL syntax - acrylian - 05-07-2010 Actually there is the get variant for such customisations. But we could take that out, too. |