select g.`galleryId`,g.`name`,g.`description`,
g.`created`,g.`lastModif`,g.`visible`,g.`theme`,g.`user`,
g.`hits`,g.`maxRows`,g.`rowImages`,g.`thumbSizeX`,
g.`thumbSizeY`,g.`public`,g.`sortorder`,g.`sortdirection`,
g.`galleryimage`,g.`parentgallery`,count(i.`imageId`) as numimages
from `tiki_galleries` g, `tiki_images` i
where i.`galleryId`=g.`galleryId` and
`parentgallery`=? group by
g.`galleryId`, g.`name`,g.`description`,
g.`created`,g.`lastModif`,g.`visible`,g.`theme`,g.`user`,
g.`hits`,g.`maxRows`,g.`rowImages`,g.`thumbSizeX`,
g.`thumbSizeY`,g.`public`,g.`sortorder`,g.`sortdirection`,
g.`galleryimage`,g.`parentgallery`
order by `images` desc
Values:
0
6
Message:
Unknown column 'images' in 'order clause'
Built query was probably:
select g.`galleryId`,g.`name`,g.`description`,
g.`created`,g.`lastModif`,g.`visible`,g.`theme`,g.`user`,
g.`hits`,g.`maxRows`,g.`rowImages`,g.`thumbSizeX`,
g.`thumbSizeY`,g.`public`,g.`sortorder`,g.`sortdirection`,
g.`galleryimage`,g.`parentgallery`,count(i.`imageId`) as numimages
from `tiki_galleries` g, `tiki_images` i
where i.`galleryId`=g.`galleryId` and
`parentgallery`='6' group by
g.`galleryId`, g.`name`,g.`description`,
g.`created`,g.`lastModif`,g.`visible`,g.`theme`,g.`user`,
g.`hits`,g.`maxRows`,g.`rowImages`,g.`thumbSizeX`,
g.`thumbSizeY`,g.`public`,g.`sortorder`,g.`sortdirection`,
g.`galleryimage`,g.`parentgallery`
order by `images` desc