I have a really bizarre error that only shows on Chrome and Safari, but not FF or IE. It appears when using my own function based on printRandomImages(), but it also appears when using actual printRandomImages(5,'','all','',200,200,false); The message is shown below. The rest of the site looks OK, but I'm completely stumped as to why it only appears in these two browsers. I've been extensively testing using FF and IE, but this was just some additional testing. Any help or thoughts would be appreciated
Zenphoto Error
MySQL Query ( SELECT COUNT(*) AS row_count FROM `SkiClub_images`, `SkiClub_albums` WHERE `SkiClub_albums`.folder!="" AND `SkiClub_images`.albumid = `SkiClub_albums`.id AND `SkiClub_albums`.show = 1 AND `SkiClub_images`.show=1 ) failed. Error: 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 'show = 1 AND `SkiClub_images`.show=1' at line 1
Comments
For information, the images are in the sidebar and I note there was an MySQL error report with this function in the sidebar about a year ago, but that appears to have corrected.
Did setup complain about anything? Anyway, a mysql error could never be browser dependend. Assuming you use the latest version please check that you really have uploaded all files correctly. Please try a complete reinstall.
Also a link to the site in question would be helpful.
Regardless of browser or machine, the function works when I'm logged in - either using my full admin rights or as a limited admin user. This explains why I could see everything OK on my work machine, because I use FF as my main browser (logged in with full admin rights) and IE to check compatibility etc (logged in as a limited user). Safari and Chrome are both used for testing, but I wasn't logged in, just viewing.
The sidebar is an amended version of the ZenPage Default, but on further experimentation, the error occurs in normal pages as well.
MySQL is 4.0. I don't recall any errors on setup, but I wouldn't swear to it, as it all seemed to work, although there may have been warnings.
Another strange thing I've just noticed is that unpublished pages are shown when logged in as admin, but are not (correctly) when not logged in. Is this a connected issue?
I've removed the section from the test site for the moment, but if you'd like to see it, I could put is back and give you the link.
The reason you do not get the errors when logged in is that this clause `show` is omitted in that case because admins are allowed to view unpublished images/albums.
MySQL Query ( SELECT COUNT(*) AS row_count FROM `SkiClub_images`, `SkiClub_albums` WHERE `SkiClub_albums`.folder!="" AND `SkiClub_images`.albumid = `SkiClub_albums`.id AND `SkiClub_albums.show`=1 AND `SkiClub_images.show`=1 ) failed. Error: Unknown column 'SkiClub_albums.show' in 'where clause'