i am only using "image page" in theme personality, and i got the this error when i enter in sub album:
MySQL Query ( SELECT COUNT(*) AS row_count FROM `zp_images`, `zp_albums` WHERE `zp_albums`.folder!="" AND `zp_images`.albumid = `zp_albums`.id AND `zp_albums`.id in) ) 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 ')' at line 1
i think i have found out the problem. the above error will be occured when all sub-albums not publish. if i publish at least 1 sub-album, the error will not occur.
I am not able to reproduce this problem. Please make a trouble ticket for it.
But also, change the define for DEBUG_ERROR (line 15 of functions-basic.php) from false to true so that it will give us a trace of where the SQL was called.
Also, please be specific about the album configuration. Are there images in it as well as subalbums? Is the album you are viewing when the error occurs a first level album or within another album?
case 1, all the albums are not published ---------------------------------------- i can enter to gallery (root), i can enter album-b, i cannot enter album-a and got error message.
case 2, publish only one child album (example: sub-album-a1 or sub-sub-album-i) --------------------------------------------------- i can enter to gallery (root), i can enter album-b, i can enter album-a, i can enter sub-album-a1 and all sub-sub-albums below. but still cannot enter sub-album-a2 and got error message.
case 3, publish only one child album (example: sub-album-a2 or sub-sub-album-x) --------------------------------------------------- i can enter to gallery (root), i can enter album-b, i can enter album-a, i can enter sub-album-a2 and all sub-sub-albums below. but still cannot enter sub-album-a1 and got error message.
error message is: MySQL Query ( SELECT COUNT(*) AS row_count FROM `zp_images`, `zp_albums` WHERE `zp_albums`.folder!="" AND `zp_images`.albumid = `zp_albums`.id AND `zp_albums`.id in) ) 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 ')' at line 1
Backtrace:
in query (functions-db.php [101]) in query_single_row (template-functions.php [3325]) in getRandomImagesAlbum (album.php [149]) in include (index.php [118])
Comments
i am only using "image page" in theme personality,
and i got the this error when i enter in sub album:
MySQL Query ( SELECT COUNT(*) AS row_count FROM `zp_images`, `zp_albums` WHERE `zp_albums`.folder!="" AND `zp_images`.albumid = `zp_albums`.id AND `zp_albums`.id in) ) 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 ')' at line 1
i am using zenphoto svn r3417
please help, thx
the above error will be occured when all sub-albums not publish.
if i publish at least 1 sub-album, the error will not occur.
i am not sure it is a bug or my miss-operating.
please advise, thx
But also, change the define for DEBUG_ERROR (line 15 of functions-basic.php) from false to true so that it will give us a trace of where the SQL was called.
Also, please be specific about the album configuration. Are there images in it as well as subalbums? Is the album you are viewing when the error occurs a first level album or within another album?
i have upgraded zp to v1.2.3 r3427 and the problem is still occured.
i uncheck "Publish albums by default" because my zenphoto is not for public, only publish album when need.
my album structure:
gallery (root)
--- album-a
------- sub-album-a1 (photos inside)
----------- sub-sub-album-i (photos inside)
----------- sub-sub-album-j (photos inside)
----------- sub-sub-album-k (photos inside)
------- sub-album-a2 (photos inside)
----------- sub-sub-album-x (photos inside)
----------- sub-sub-album-y (photos inside)
----------- sub-sub-album-z (photos inside)
------- sub-album-a3 (photos inside)
--- album-b (empty)
case 1, all the albums are not published
----------------------------------------
i can enter to gallery (root), i can enter album-b, i cannot enter album-a and got error message.
case 2, publish only one child album (example: sub-album-a1 or sub-sub-album-i)
---------------------------------------------------
i can enter to gallery (root), i can enter album-b, i can enter album-a, i can enter
sub-album-a1 and all sub-sub-albums below. but still cannot enter sub-album-a2 and got error message.
case 3, publish only one child album (example: sub-album-a2 or sub-sub-album-x)
---------------------------------------------------
i can enter to gallery (root), i can enter album-b, i can enter album-a, i can enter
sub-album-a2 and all sub-sub-albums below. but still cannot enter sub-album-a1 and got error message.
error message is:
MySQL Query ( SELECT COUNT(*) AS row_count FROM `zp_images`, `zp_albums` WHERE `zp_albums`.folder!="" AND `zp_images`.albumid = `zp_albums`.id AND `zp_albums`.id in) ) 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 ')' at line 1
Backtrace:
in query (functions-db.php [101])
in query_single_row (template-functions.php [3325])
in getRandomImagesAlbum (album.php [149])
in include (index.php [118])
greate job!