using printLatestComments() I get this error:
'
Zenphoto Error
MySQL Query ( SELECT c.id, c.name, c.website, c.date, c.comment, i.title, i.filename, a.folder, a.title AS albumtitle, FROM `zp_comments` AS c, `zp_images` AS i, `zp_albums` AS a WHERE `type`=images AND c.imageid = i.id AND i.albumid = a.id ORDER BY c.id DESC LIMIT 5 ) Failed. Error: You have an error in your SQL syntax near 'FROM `zp_comments` AS c, `zp_images` AS i, `zp_albums` AS a WHERE `type`=images' at line 1
,
however with using a query like:
' $comments = query_full_array("SELECT c.id, i.title, i.filename, a.folder, a.title AS albumtitle, c.name, c.website,"
. " (c.date + 0) AS date, c.comment, c.email, c.inmoderation FROM ".prefix('comments')." AS c, ".prefix('images')." AS i, ".prefix('albums')." AS a "
. " WHERE c.imageid = i.id AND i.albumid = a.id ORDER BY c.id DESC LIMIT 20" );'
I am able to retriev the commnets. I am using the nightlybuild 18 december..
any ideas?
Comments
It is also possible that images needs to be enclosed in quotes.
However phpmyadmin showed a warning on the table:
"Warning More than one INDEX key was created for column `imageid`"
indexes showed up til 19 keys: `imageid` `imageid_1`....`imageid_19`
I just deleted all extra keys but no change on the error..
and if I use the function: '<?php printLatestComments(1,'albums'); ?>'
the error now is:
MySQL Query ( SELECT c.id, c.name, c.website, c.date, c.comment, a.folder, a.title AS albumtitle, FROM `zp_comments` AS c, `zp_albums` AS a WHERE `type`=albums AND c.imageid = a.id ORDER BY c.id DESC LIMIT 1 ) Failed. Error: You have an error in your SQL syntax near 'FROM `zp_comments` AS c, `zp_albums` AS a WHERE `type`=albums AND c.imageid = a' at line 1
If you really need an image/album option let us know.