ZenphotoCMS Forum
Random Thumbnail? - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: Random Thumbnail? (/thread-2286.html)

Pages: 1 2


Random Thumbnail? - BertSimons - 01-03-2008

nope sbillard.. as you can see at the moment at http://www.bertsimons.nl/zenphototest/ i'm using stopdesign with the same error result




Random Thumbnail? - trisweb - 01-03-2008

The issue, I believe, is that 'SHOW' is a reserved word in MySQL (eg: SHOW ALL TABLES so it gets very confused if it shows up unquoted (in backticks).

I'm all for changing the name of that column - we really shouldn't use reserved words even if we do make sure to quote them, it's just not good practice.

For now, you can find some way to quote the column name, so it'd look something like 'zp_images'.'show' (except - the single quotes should be backticks, but this forum won't show them since it uses that for code notation).




Random Thumbnail? - sbillard - 01-03-2008

I suspect your version of MySQL is not allowing the zp_images.show perhaps. But then there should be other parts of zenphoto that get this error. You can try a change to the SQL circa line 2642 of template-functions.php. Change the prefix('images') . '.show, ' . prefix('albums') . '.show, to prefix('images.show') . ', ' . prefix('albums.show') . ', '




Random Thumbnail? - sbillard - 01-03-2008

Tried that and it did not work. What does work at least with my version of MySQL, is
putting peck marks arount the words show in the line. (Both instances.)




Random Thumbnail? - sbillard - 01-03-2008

Or, even better still, delete both of them since they are not used.




Random Thumbnail? - sbillard - 01-03-2008

The nightly will have the correction. There was still another place that needed to have peckmarks around "show".




Random Thumbnail? - BertSimons - 02-03-2008

sbillard, with the nightly build printRandomImages() now works in every theme and also in my own theme wp-sidebar. thanks team for solving this




Random Thumbnail? - sbillard - 02-03-2008

Thanks for the report. Specially since all I could test was that the change did not break anything for me--the old code worked on my version of MySQL!