SELECT *
FROM jos_session
WHERE session_id = '98fa28367ce4a6cd224e5534fc96aaa8'
DELETE
FROM jos_session
WHERE ( TIME < '1733814662' )
SELECT *
FROM jos_session
WHERE session_id = '98fa28367ce4a6cd224e5534fc96aaa8'
INSERT INTO `jos_session` ( `session_id`,`time`,`username`,`gid`,`guest`,`client_id` )
VALUES ( '98fa28367ce4a6cd224e5534fc96aaa8','1733818262','','0','1','0' )
SELECT *
FROM jos_components
WHERE parent = 0
SELECT folder AS TYPE, element AS name, params
FROM jos_plugins
WHERE published >= 1
AND access <= 0
ORDER BY ordering
SELECT m.*, c.`option` AS component
FROM jos_menu AS m
LEFT JOIN jos_components AS c
ON m.componentid = c.id
WHERE m.published = 1
ORDER BY m.sublevel, m.parent, m.ordering
SELECT *
FROM jos_joomgallery_config
WHERE id = 0
SELECT
uid,
uuserid,
zipname
FROM
jos_joomgallery_users
WHERE
zipname != ''
AND TIME != ''
AND TIME < NOW()-INTERVAL 60 SECOND
SELECT id, title, module, POSITION, content, showtitle, control, params
FROM jos_modules AS m
LEFT JOIN jos_modules_menu AS mm
ON mm.moduleid = m.id
WHERE m.published = 1
AND m.access <= 0
AND m.client_id = 0
AND ( mm.menuid = 16 OR mm.menuid = 0 )
ORDER BY POSITION, ordering
SELECT
COUNT(cid)
FROM
jos_joomgallery_catg
WHERE
cid = '452'
AND access <= '0'
AND published = '1'
SELECT
COUNT(cid)
FROM
jos_joomgallery_catg AS d
WHERE
d.parent = 452
AND d.published = '1'
AND d.access <= '0'
SELECT
d.*
FROM
jos_joomgallery_catg AS d
WHERE
d.parent = 452
AND d.published = '1'
AND d.access<= '0'
ORDER BY d.ordering
LIMIT 0,12
SELECT MAX(imgdate)
FROM jos_joomgallery AS a
LEFT JOIN jos_joomgallery_catg AS c
ON c.cid=a.catid
WHERE a.catid IN (476)
AND a.published = '1'
AND a.approved='1'
AND c.access <= 0
AND c.published = '1'
SELECT cid
FROM jos_joomgallery_catg
WHERE parent IN (476)
AND access <= 0
AND published = '1'
SELECT MAX(imgdate)
FROM jos_joomgallery AS a
LEFT JOIN jos_joomgallery_catg AS c
ON c.cid=a.catid
WHERE a.catid IN (398)
AND a.published = '1'
AND a.approved='1'
AND c.access <= 0
AND c.published = '1'
SELECT cid
FROM jos_joomgallery_catg
WHERE parent IN (398)
AND access <= 0
AND published = '1'
SELECT ca.cid,ca.parent,IFNULL(COUNT(p.id),0) AS piccount
FROM jos_joomgallery_catg AS ca
LEFT JOIN jos_joomgallery AS p
ON p.catid = ca.cid
WHERE ca.published = '1'
AND ca.access <= '0'
AND (isnull(p.published) OR p.published=1)
AND (isnull(p.approved) OR p.approved=1)
/* unpublished approved picture for category, only working with own coice */
OR ((isnull(p.published) OR p.published=0)
AND (isnull(p.approved) OR p.approved=1))
GROUP BY ca.cid
ORDER BY CAST(parent AS UNSIGNED)
SELECT catpath
FROM jos_joomgallery_catg
WHERE cid= '398'
SELECT
*,
c.access
FROM
jos_joomgallery AS p
LEFT JOIN
jos_joomgallery_catg AS c
ON c.cid = p.catid
WHERE
p.catid = 398
AND p.published = '1'
AND p.approved = '1'
AND c.access <= 0
AND c.published = '1'
ORDER BY
rand()
LIMIT 1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=476
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=398
AND published=1
SELECT COUNT(id) AS COUNT
FROM jos_joomgallery
WHERE published = 1
AND approved = 1
AND catid IN (476,398)
SELECT MAX(imgdate)
FROM jos_joomgallery AS a
LEFT JOIN jos_joomgallery_catg AS c
ON c.cid=a.catid
WHERE a.catid IN (475)
AND a.published = '1'
AND a.approved='1'
AND c.access <= 0
AND c.published = '1'
SELECT cid
FROM jos_joomgallery_catg
WHERE parent IN (475)
AND access <= 0
AND published = '1'
SELECT MAX(imgdate)
FROM jos_joomgallery AS a
LEFT JOIN jos_joomgallery_catg AS c
ON c.cid=a.catid
WHERE a.catid IN (390)
AND a.published = '1'
AND a.approved='1'
AND c.access <= 0
AND c.published = '1'
SELECT cid
FROM jos_joomgallery_catg
WHERE parent IN (390)
AND access <= 0
AND published = '1'
SELECT catpath
FROM jos_joomgallery_catg
WHERE cid= '390'
SELECT
*,
c.access
FROM
jos_joomgallery AS p
LEFT JOIN
jos_joomgallery_catg AS c
ON c.cid = p.catid
WHERE
p.catid = 390
AND p.published = '1'
AND p.approved = '1'
AND c.access <= 0
AND c.published = '1'
ORDER BY
rand()
LIMIT 1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=475
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=390
AND published=1
SELECT COUNT(id) AS COUNT
FROM jos_joomgallery
WHERE published = 1
AND approved = 1
AND catid IN (475,390)
SELECT MAX(imgdate)
FROM jos_joomgallery AS a
LEFT JOIN jos_joomgallery_catg AS c
ON c.cid=a.catid
WHERE a.catid IN (474)
AND a.published = '1'
AND a.approved='1'
AND c.access <= 0
AND c.published = '1'
SELECT cid
FROM jos_joomgallery_catg
WHERE parent IN (474)
AND access <= 0
AND published = '1'
SELECT MAX(imgdate)
FROM jos_joomgallery AS a
LEFT JOIN jos_joomgallery_catg AS c
ON c.cid=a.catid
WHERE a.catid IN (373,375,377,376,379,384,382)
AND a.published = '1'
AND a.approved='1'
AND c.access <= 0
AND c.published = '1'
SELECT cid
FROM jos_joomgallery_catg
WHERE parent IN (373,375,377,376,379,384,382)
AND access <= 0
AND published = '1'
SELECT catpath
FROM jos_joomgallery_catg
WHERE cid= '375'
SELECT
*,
c.access
FROM
jos_joomgallery AS p
LEFT JOIN
jos_joomgallery_catg AS c
ON c.cid = p.catid
WHERE
p.catid = 375
AND p.published = '1'
AND p.approved = '1'
AND c.access <= 0
AND c.published = '1'
ORDER BY
rand()
LIMIT 1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=474
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=373
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=375
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=377
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=376
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=379
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=384
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=382
AND published=1
SELECT COUNT(id) AS COUNT
FROM jos_joomgallery
WHERE published = 1
AND approved = 1
AND catid IN (474,373,375,377,376,379,384,382)
SELECT MAX(imgdate)
FROM jos_joomgallery AS a
LEFT JOIN jos_joomgallery_catg AS c
ON c.cid=a.catid
WHERE a.catid IN (473)
AND a.published = '1'
AND a.approved='1'
AND c.access <= 0
AND c.published = '1'
SELECT cid
FROM jos_joomgallery_catg
WHERE parent IN (473)
AND access <= 0
AND published = '1'
SELECT MAX(imgdate)
FROM jos_joomgallery AS a
LEFT JOIN jos_joomgallery_catg AS c
ON c.cid=a.catid
WHERE a.catid IN (359,357,360,361,365,367)
AND a.published = '1'
AND a.approved='1'
AND c.access <= 0
AND c.published = '1'
SELECT cid
FROM jos_joomgallery_catg
WHERE parent IN (359,357,360,361,365,367)
AND access <= 0
AND published = '1'
SELECT catpath
FROM jos_joomgallery_catg
WHERE cid= '365'
SELECT
*,
c.access
FROM
jos_joomgallery AS p
LEFT JOIN
jos_joomgallery_catg AS c
ON c.cid = p.catid
WHERE
p.catid = 365
AND p.published = '1'
AND p.approved = '1'
AND c.access <= 0
AND c.published = '1'
ORDER BY
rand()
LIMIT 1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=473
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=359
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=357
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=360
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=361
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=365
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=367
AND published=1
SELECT COUNT(id) AS COUNT
FROM jos_joomgallery
WHERE published = 1
AND approved = 1
AND catid IN (473,359,357,360,361,365,367)
SELECT MAX(imgdate)
FROM jos_joomgallery AS a
LEFT JOIN jos_joomgallery_catg AS c
ON c.cid=a.catid
WHERE a.catid IN (472)
AND a.published = '1'
AND a.approved='1'
AND c.access <= 0
AND c.published = '1'
SELECT cid
FROM jos_joomgallery_catg
WHERE parent IN (472)
AND access <= 0
AND published = '1'
SELECT MAX(imgdate)
FROM jos_joomgallery AS a
LEFT JOIN jos_joomgallery_catg AS c
ON c.cid=a.catid
WHERE a.catid IN (335,340,336,342,343,344,345,346,351,347)
AND a.published = '1'
AND a.approved='1'
AND c.access <= 0
AND c.published = '1'
SELECT cid
FROM jos_joomgallery_catg
WHERE parent IN (335,340,336,342,343,344,345,346,351,347)
AND access <= 0
AND published = '1'
SELECT catpath
FROM jos_joomgallery_catg
WHERE cid= '344'
SELECT
*,
c.access
FROM
jos_joomgallery AS p
LEFT JOIN
jos_joomgallery_catg AS c
ON c.cid = p.catid
WHERE
p.catid = 344
AND p.published = '1'
AND p.approved = '1'
AND c.access <= 0
AND c.published = '1'
ORDER BY
rand()
LIMIT 1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=472
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=335
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=340
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=336
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=342
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=343
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=344
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=345
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=346
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=351
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=347
AND published=1
SELECT COUNT(id) AS COUNT
FROM jos_joomgallery
WHERE published = 1
AND approved = 1
AND catid IN (472,335,340,336,342,343,344,345,346,351,347)
SELECT MAX(imgdate)
FROM jos_joomgallery AS a
LEFT JOIN jos_joomgallery_catg AS c
ON c.cid=a.catid
WHERE a.catid IN (471)
AND a.published = '1'
AND a.approved='1'
AND c.access <= 0
AND c.published = '1'
SELECT cid
FROM jos_joomgallery_catg
WHERE parent IN (471)
AND access <= 0
AND published = '1'
SELECT MAX(imgdate)
FROM jos_joomgallery AS a
LEFT JOIN jos_joomgallery_catg AS c
ON c.cid=a.catid
WHERE a.catid IN (326,323,327,330,333)
AND a.published = '1'
AND a.approved='1'
AND c.access <= 0
AND c.published = '1'
SELECT cid
FROM jos_joomgallery_catg
WHERE parent IN (326,323,327,330,333)
AND access <= 0
AND published = '1'
SELECT catpath
FROM jos_joomgallery_catg
WHERE cid= '326'
SELECT
*,
c.access
FROM
jos_joomgallery AS p
LEFT JOIN
jos_joomgallery_catg AS c
ON c.cid = p.catid
WHERE
p.catid = 326
AND p.published = '1'
AND p.approved = '1'
AND c.access <= 0
AND c.published = '1'
ORDER BY
rand()
LIMIT 1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=471
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=326
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=323
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=327
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=330
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=333
AND published=1
SELECT COUNT(id) AS COUNT
FROM jos_joomgallery
WHERE published = 1
AND approved = 1
AND catid IN (471,326,323,327,330,333)
SELECT MAX(imgdate)
FROM jos_joomgallery AS a
LEFT JOIN jos_joomgallery_catg AS c
ON c.cid=a.catid
WHERE a.catid IN (470)
AND a.published = '1'
AND a.approved='1'
AND c.access <= 0
AND c.published = '1'
SELECT cid
FROM jos_joomgallery_catg
WHERE parent IN (470)
AND access <= 0
AND published = '1'
SELECT MAX(imgdate)
FROM jos_joomgallery AS a
LEFT JOIN jos_joomgallery_catg AS c
ON c.cid=a.catid
WHERE a.catid IN (314,315,319)
AND a.published = '1'
AND a.approved='1'
AND c.access <= 0
AND c.published = '1'
SELECT cid
FROM jos_joomgallery_catg
WHERE parent IN (314,315,319)
AND access <= 0
AND published = '1'
SELECT catpath
FROM jos_joomgallery_catg
WHERE cid= '319'
SELECT
*,
c.access
FROM
jos_joomgallery AS p
LEFT JOIN
jos_joomgallery_catg AS c
ON c.cid = p.catid
WHERE
p.catid = 319
AND p.published = '1'
AND p.approved = '1'
AND c.access <= 0
AND c.published = '1'
ORDER BY
rand()
LIMIT 1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=470
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=314
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=315
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=319
AND published=1
SELECT COUNT(id) AS COUNT
FROM jos_joomgallery
WHERE published = 1
AND approved = 1
AND catid IN (470,314,315,319)
SELECT MAX(imgdate)
FROM jos_joomgallery AS a
LEFT JOIN jos_joomgallery_catg AS c
ON c.cid=a.catid
WHERE a.catid IN (469)
AND a.published = '1'
AND a.approved='1'
AND c.access <= 0
AND c.published = '1'
SELECT cid
FROM jos_joomgallery_catg
WHERE parent IN (469)
AND access <= 0
AND published = '1'
SELECT MAX(imgdate)
FROM jos_joomgallery AS a
LEFT JOIN jos_joomgallery_catg AS c
ON c.cid=a.catid
WHERE a.catid IN (298,305,299,307,312,309,308)
AND a.published = '1'
AND a.approved='1'
AND c.access <= 0
AND c.published = '1'
SELECT cid
FROM jos_joomgallery_catg
WHERE parent IN (298,305,299,307,312,309,308)
AND access <= 0
AND published = '1'
SELECT catpath
FROM jos_joomgallery_catg
WHERE cid= '299'
SELECT
*,
c.access
FROM
jos_joomgallery AS p
LEFT JOIN
jos_joomgallery_catg AS c
ON c.cid = p.catid
WHERE
p.catid = 299
AND p.published = '1'
AND p.approved = '1'
AND c.access <= 0
AND c.published = '1'
ORDER BY
rand()
LIMIT 1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=469
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=298
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=305
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=299
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=307
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=312
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=309
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=308
AND published=1
SELECT COUNT(id) AS COUNT
FROM jos_joomgallery
WHERE published = 1
AND approved = 1
AND catid IN (469,298,305,299,307,312,309,308)
SELECT MAX(imgdate)
FROM jos_joomgallery AS a
LEFT JOIN jos_joomgallery_catg AS c
ON c.cid=a.catid
WHERE a.catid IN (468)
AND a.published = '1'
AND a.approved='1'
AND c.access <= 0
AND c.published = '1'
SELECT cid
FROM jos_joomgallery_catg
WHERE parent IN (468)
AND access <= 0
AND published = '1'
SELECT MAX(imgdate)
FROM jos_joomgallery AS a
LEFT JOIN jos_joomgallery_catg AS c
ON c.cid=a.catid
WHERE a.catid IN (294)
AND a.published = '1'
AND a.approved='1'
AND c.access <= 0
AND c.published = '1'
SELECT cid
FROM jos_joomgallery_catg
WHERE parent IN (294)
AND access <= 0
AND published = '1'
SELECT catpath
FROM jos_joomgallery_catg
WHERE cid= '294'
SELECT
*,
c.access
FROM
jos_joomgallery AS p
LEFT JOIN
jos_joomgallery_catg AS c
ON c.cid = p.catid
WHERE
p.catid = 294
AND p.published = '1'
AND p.approved = '1'
AND c.access <= 0
AND c.published = '1'
ORDER BY
rand()
LIMIT 1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=468
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=294
AND published=1
SELECT COUNT(id) AS COUNT
FROM jos_joomgallery
WHERE published = 1
AND approved = 1
AND catid IN (468,294)
SELECT MAX(imgdate)
FROM jos_joomgallery AS a
LEFT JOIN jos_joomgallery_catg AS c
ON c.cid=a.catid
WHERE a.catid IN (287)
AND a.published = '1'
AND a.approved='1'
AND c.access <= 0
AND c.published = '1'
SELECT cid
FROM jos_joomgallery_catg
WHERE parent IN (287)
AND access <= 0
AND published = '1'
SELECT MAX(imgdate)
FROM jos_joomgallery AS a
LEFT JOIN jos_joomgallery_catg AS c
ON c.cid=a.catid
WHERE a.catid IN (288,290)
AND a.published = '1'
AND a.approved='1'
AND c.access <= 0
AND c.published = '1'
SELECT cid
FROM jos_joomgallery_catg
WHERE parent IN (288,290)
AND access <= 0
AND published = '1'
SELECT catpath
FROM jos_joomgallery_catg
WHERE cid= '288'
SELECT
*,
c.access
FROM
jos_joomgallery AS p
LEFT JOIN
jos_joomgallery_catg AS c
ON c.cid = p.catid
WHERE
p.catid = 288
AND p.published = '1'
AND p.approved = '1'
AND c.access <= 0
AND c.published = '1'
ORDER BY
rand()
LIMIT 1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=287
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=288
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=290
AND published=1
SELECT COUNT(id) AS COUNT
FROM jos_joomgallery
WHERE published = 1
AND approved = 1
AND catid IN (287,288,290)
SELECT MAX(imgdate)
FROM jos_joomgallery AS a
LEFT JOIN jos_joomgallery_catg AS c
ON c.cid=a.catid
WHERE a.catid IN (467)
AND a.published = '1'
AND a.approved='1'
AND c.access <= 0
AND c.published = '1'
SELECT cid
FROM jos_joomgallery_catg
WHERE parent IN (467)
AND access <= 0
AND published = '1'
SELECT MAX(imgdate)
FROM jos_joomgallery AS a
LEFT JOIN jos_joomgallery_catg AS c
ON c.cid=a.catid
WHERE a.catid IN (284)
AND a.published = '1'
AND a.approved='1'
AND c.access <= 0
AND c.published = '1'
SELECT cid
FROM jos_joomgallery_catg
WHERE parent IN (284)
AND access <= 0
AND published = '1'
SELECT catpath
FROM jos_joomgallery_catg
WHERE cid= '284'
SELECT
*,
c.access
FROM
jos_joomgallery AS p
LEFT JOIN
jos_joomgallery_catg AS c
ON c.cid = p.catid
WHERE
p.catid = 284
AND p.published = '1'
AND p.approved = '1'
AND c.access <= 0
AND c.published = '1'
ORDER BY
rand()
LIMIT 1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=467
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=284
AND published=1
SELECT COUNT(id) AS COUNT
FROM jos_joomgallery
WHERE published = 1
AND approved = 1
AND catid IN (467,284)
SELECT
COUNT(id)
FROM
jos_joomgallery AS a
LEFT JOIN
jos_joomgallery_catg AS c
ON c.cid=a.catid
WHERE
a.published = '1'
AND a.catid = '452'
AND a.approved = '1'
AND c.access <= '0'
SELECT
name,
cid
FROM
jos_joomgallery_catg
WHERE
cid = '452'
SELECT
COUNT(*)
FROM
jos_joomgallery AS a
LEFT JOIN
jos_joomgallery_catg AS c
ON c.cid=a.catid
WHERE
a.published = '1'
AND a.catid = '452'
AND a.approved = '1'
AND c.access <= '0'
SELECT
*,
a.owner AS owner,
ROUND(imgvotesum/imgvotes, 2) AS rating
FROM
jos_joomgallery AS a
LEFT JOIN
jos_joomgallery_catg AS c
ON c.cid=a.catid
WHERE
a.published = '1'
AND a.catid = '452'
AND a.approved = '1'
AND c.access <= '0'
ORDER BY
a.imgtitle ASC, a.ordering ASC, a.imgdate ASC
LIMIT
0,24
SELECT
COUNT(id),
SUM(imgcounter)
FROM
jos_joomgallery AS a
LEFT JOIN
jos_joomgallery_catg AS c
ON c.cid = a.catid
WHERE
a.published = '1'
AND a.approved = '1'
AND c.published = '1'
AND c.access <= 0
SELECT
name,
parent,
cid
FROM
jos_joomgallery_catg
WHERE
cid = '452'
AND published = '1'
AND access <= '0'
SELECT
name,
parent,
cid
FROM
jos_joomgallery_catg
WHERE
cid = '446'
AND published = '1'
AND access <= '0'
SELECT template
FROM jos_templates_menu
WHERE client_id = 0
AND (menuid = 0 OR menuid = 16)
ORDER BY menuid DESC
LIMIT 0, 1
SELECT p.id AS picid, p.catid, p.imgthumbname, p.imgfilename, p.imgdate
, p.imgtitle, p.imgtext,p.imgauthor,p.owner, p.imgcounter, p.imgvotes
, (p.imgvotesum/p.imgvotes) AS vote, c.name AS cattitle,c.catpath AS catpath
FROM jos_joomgallery AS p
JOIN jos_joomgallery_catg AS c
ON c.cid=p.catid
WHERE c.published='1'
AND c.access<=0
AND p.published='1'
AND p.approved='1'
AND p.catid NOT IN (643)
ORDER BY rand()
LIMIT 1
SELECT id
FROM jos_menu
WHERE link LIKE '%com_joomgallery%'
AND (access = '0' OR access = '1')
AND TYPE = 'component'
ORDER BY access, id DESC
LIMIT 1