 Error
An error occured in a database query! | Context: | | File | tiki-list_file_gallery.php | | Url | tiki-list_file_gallery.php?galleryId=3 | | Query: | | SELECT tab.* FROM ((SELECT 0 as `isgal`, tf.`fileId` as `id`, tf.`galleryId` as `parentId`, tf.`name`, tf.`description`, tf.`filesize` as `size`, tf.`created`, tf.`filename`, tf.`filetype` as `type`, tf.`user` as `creator`, tf.`author`, tf.`hits`, tf.`votes`, tf.`points`, tf.`path`, tf.`reference_url`, tf.`is_reference`, tf.`hash`, tf.`search_data`, tf.`lastModif` as `lastmodif`, tf.`lastModifUser` as `last_user`, tf.`lockedby`, tf.`comment`, tf.`archiveId`, '' as `visible`, '' as `public`, tf.`fileId`, tf.`galleryId`, tf.`filesize`, tf.`filetype`, tf.`user`, tf.`lastModifUser`, '' as `files`, count(tfh.`fileId`) as `nbArchives` FROM `tiki_files` as tf LEFT JOIN `tiki_files` tfh ON (tf.`fileId` = tfh.`archiveId`) WHERE tf.`archiveId`=0 AND tf.`galleryId`=? GROUP BY tf.`fileId`) UNION (SELECT 1 as `isgal`, tfg.`galleryId` as `id`, tfg.`parentId`, tfg.`name`, tfg.`description`, 0 as `size`, tfg.`created`, tfg.`name` as `filename`, tfg.`type`, tfg.`user` as `creator`, '' as `author`, tfg.`hits`, tfg.`votes`, tfg.`points`, '' as `path`, '' as `reference_url`, '' as `is_reference`, '' as `hash`, tfg.`name` as `search_data`, tfg.`lastmodif` as `lastmodif`, '' as `last_user`, '' as `lockedby`, '' as `comment`, 0 as `archiveId`, tfg.`visible`, tfg.`public`, tfg.`galleryId` as `fileId`, tfg.`parentId` as `galleryId`, 0 as `filesize`, tfg.`type` as `filetype`, tfg.`user`, '' as `lastModifUser`, count(distinct tfc.`fileId`) as `files`, 0 as `nbArchives` FROM `tiki_file_galleries` as tfg LEFT JOIN `tiki_files` tfc ON (tfg.`galleryId` = tfc.`galleryId`) WHERE (tfg.`user`='' OR tfg.`public`='y') AND tfg.`parentId`=? GROUP BY tfg.`galleryId`)) as tab ORDER BY `isgal` desc | | Values: | | 0 | 3 | | 1 | 3 | | Message: | | Every derived table must have its own alias |
| Built query was probably: | | SELECT tab.* FROM ((SELECT 0 as `isgal`, tf.`fileId` as `id`, tf.`galleryId` as `parentId`, tf.`name`, tf.`description`, tf.`filesize` as `size`, tf.`created`, tf.`filename`, tf.`filetype` as `type`, tf.`user` as `creator`, tf.`author`, tf.`hits`, tf.`votes`, tf.`points`, tf.`path`, tf.`reference_url`, tf.`is_reference`, tf.`hash`, tf.`search_data`, tf.`lastModif` as `lastmodif`, tf.`lastModifUser` as `last_user`, tf.`lockedby`, tf.`comment`, tf.`archiveId`, '' as `visible`, '' as `public`, tf.`fileId`, tf.`galleryId`, tf.`filesize`, tf.`filetype`, tf.`user`, tf.`lastModifUser`, '' as `files`, count(tfh.`fileId`) as `nbArchives` FROM `tiki_files` as tf LEFT JOIN `tiki_files` tfh ON (tf.`fileId` = tfh.`archiveId`) WHERE tf.`archiveId`=0 AND tf.`galleryId`='3' GROUP BY tf.`fileId`) UNION (SELECT 1 as `isgal`, tfg.`galleryId` as `id`, tfg.`parentId`, tfg.`name`, tfg.`description`, 0 as `size`, tfg.`created`, tfg.`name` as `filename`, tfg.`type`, tfg.`user` as `creator`, '' as `author`, tfg.`hits`, tfg.`votes`, tfg.`points`, '' as `path`, '' as `reference_url`, '' as `is_reference`, '' as `hash`, tfg.`name` as `search_data`, tfg.`lastmodif` as `lastmodif`, '' as `last_user`, '' as `lockedby`, '' as `comment`, 0 as `archiveId`, tfg.`visible`, tfg.`public`, tfg.`galleryId` as `fileId`, tfg.`parentId` as `galleryId`, 0 as `filesize`, tfg.`type` as `filetype`, tfg.`user`, '' as `lastModifUser`, count(distinct tfc.`fileId`) as `files`, 0 as `nbArchives` FROM `tiki_file_galleries` as tfg LEFT JOIN `tiki_files` tfc ON (tfg.`galleryId` = tfc.`galleryId`) WHERE (tfg.`user`='' OR tfg.`public`='y') AND tfg.`parentId`='3' GROUP BY tfg.`galleryId`)) as tab ORDER BY `isgal` desc |
|
Killer Rigs
Shaun's Old Server
|