Error Error

An error occured in a database query!

Context:
Filetiki-list_file_gallery.php
Urltiki-list_file_gallery.php?galleryId=2
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:
02
12
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`='2' 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`='2' GROUP BY tfg.`galleryId`)) as tab ORDER BY `isgal` desc


You are not logged in. Go to Login Page


Go back

Return to home page

Online users

2 online users

Killer Rigs

thumbnail
Hal1
Powered by Tikiwiki Powered by PHP Powered by Smarty Powered by ADOdb Made with CSS Powered by RDF powered by The PHP Layers Menu System
RSS feed Wiki RSS feed Blogs RSS feed Articles RSS feed Image Galleries RSS feed File Galleries RSS feed Forums RSS feed Maps
[ Execution time: 0.70 secs ]   [ Memory usage: Unknown ]   [ GZIP Disabled ]   [ Server load: ? ]