SELECT *
FROM jos_session
WHERE session_id = 'fe5cd18fb0045b65958e43e147288149'
DELETE
FROM jos_session
WHERE ( TIME < '1733811438' )
SELECT *
FROM jos_session
WHERE session_id = 'fe5cd18fb0045b65958e43e147288149'
INSERT INTO `jos_session` ( `session_id`,`time`,`username`,`gid`,`guest`,`client_id` )
VALUES ( 'fe5cd18fb0045b65958e43e147288149','1733815038','','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 = '445'
AND access <= '0'
AND published = '1'
SELECT
COUNT(cid)
FROM
jos_joomgallery_catg AS d
WHERE
d.parent = 445
AND d.published = '1'
AND d.access <= '0'
SELECT
d.*
FROM
jos_joomgallery_catg AS d
WHERE
d.parent = 445
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 (664)
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 (664)
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 (665,667,672,677,680,685,694)
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 (665,667,672,677,680,685,694)
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 (666,668,673,674,678,679,681,682,683,684,686,687,695)
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 (666,668,673,674,678,679,681,682,683,684,686,687,695)
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= '678'
SELECT
*,
c.access
FROM
jos_joomgallery AS p
LEFT JOIN
jos_joomgallery_catg AS c
ON c.cid = p.catid
WHERE
p.catid = 678
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=664
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=665
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=667
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=672
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=677
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=680
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=685
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=694
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=666
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=668
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=673
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=674
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=678
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=679
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=681
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=682
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=683
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=684
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=686
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=687
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=695
AND published=1
SELECT COUNT(id) AS COUNT
FROM jos_joomgallery
WHERE published = 1
AND approved = 1
AND catid IN (664,665,667,672,677,680,685,694,666,668,673,674,678,679,681,682,683,684,686,687,695)
SELECT MAX(imgdate)
FROM jos_joomgallery AS a
LEFT JOIN jos_joomgallery_catg AS c
ON c.cid=a.catid
WHERE a.catid IN (595)
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 (595)
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 (653,596,606,611,612,622,625,640,646,659,661)
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 (653,596,606,611,612,622,625,640,646,659,661)
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 (597,598,607,608,609,614,613,615,616,617,623,624,627,626,628,639,641,642,647,656,654,660,662,663)
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 (597,598,607,608,609,614,613,615,616,617,623,624,627,626,628,639,641,642,647,656,654,660,662,663)
AND access <= 0
AND published = '1'
SELECT catpath
FROM jos_joomgallery_catg
WHERE cid= '624'
SELECT
*,
c.access
FROM
jos_joomgallery AS p
LEFT JOIN
jos_joomgallery_catg AS c
ON c.cid = p.catid
WHERE
p.catid = 624
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=595
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=653
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=596
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=606
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=611
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=612
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=622
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=625
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=640
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=646
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=659
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=661
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=656
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=654
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=597
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=598
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=607
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=608
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=609
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=614
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=613
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=615
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=616
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=617
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=623
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=624
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=627
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=626
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=628
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=639
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=641
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=642
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=647
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=660
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=662
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=663
AND published=1
SELECT COUNT(id) AS COUNT
FROM jos_joomgallery
WHERE published = 1
AND approved = 1
AND catid IN (595,653,596,606,611,612,622,625,640,646,659,661,656,654,597,598,607,608,609,614,613,615,616,617,623,624,627,626,628,639,641,642,647,660,662,663)
SELECT MAX(imgdate)
FROM jos_joomgallery AS a
LEFT JOIN jos_joomgallery_catg AS c
ON c.cid=a.catid
WHERE a.catid IN (508)
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 (508)
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 (509,514,524,519,530,528,540,560,570,574,579)
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 (509,514,524,519,530,528,540,560,570,574,579)
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 (510,515,520,521,522,525,529,532,541,548,584,555,585,554,553,561,586,573,571,572,575,577,576,578,587,580,591,590,592)
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 (510,515,520,521,522,525,529,532,541,548,584,555,585,554,553,561,586,573,571,572,575,577,576,578,587,580,591,590,592)
AND access <= 0
AND published = '1'
SELECT catpath
FROM jos_joomgallery_catg
WHERE cid= '521'
SELECT
*,
c.access
FROM
jos_joomgallery AS p
LEFT JOIN
jos_joomgallery_catg AS c
ON c.cid = p.catid
WHERE
p.catid = 521
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=508
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=509
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=514
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=524
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=519
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=530
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=528
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=540
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=560
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=570
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=574
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=579
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=510
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=515
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=525
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=520
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=521
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=522
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=532
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=529
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=541
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=548
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=584
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=555
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=585
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=554
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=553
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=561
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=586
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=573
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=571
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=572
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=575
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=577
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=576
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=578
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=587
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=580
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=591
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=590
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=592
AND published=1
SELECT COUNT(id) AS COUNT
FROM jos_joomgallery
WHERE published = 1
AND approved = 1
AND catid IN (508,509,514,524,519,530,528,540,560,570,574,579,510,515,525,520,521,522,532,529,541,548,584,555,585,554,553,561,586,573,571,572,575,577,576,578,587,580,591,590,592)
SELECT MAX(imgdate)
FROM jos_joomgallery AS a
LEFT JOIN jos_joomgallery_catg AS c
ON c.cid=a.catid
WHERE a.catid IN (410)
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 (410)
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 (412,416,420,426,431,434,486,490,500,505)
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 (412,416,420,426,431,434,486,490,500,505)
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 (411,417,418,419,422,421,423,424,427,429,428,430,432,484,433,435,485,487,491,492,493,498,499,501,502,503,504,506,507)
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 (411,417,418,419,422,421,423,424,427,429,428,430,432,484,433,435,485,487,491,492,493,498,499,501,502,503,504,506,507)
AND access <= 0
AND published = '1'
SELECT catpath
FROM jos_joomgallery_catg
WHERE cid= '492'
SELECT
*,
c.access
FROM
jos_joomgallery AS p
LEFT JOIN
jos_joomgallery_catg AS c
ON c.cid = p.catid
WHERE
p.catid = 492
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=410
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=412
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=416
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=420
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=426
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=431
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=434
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=486
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=490
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=500
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=505
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=411
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=417
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=418
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=419
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=422
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=421
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=423
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=424
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=427
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=429
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=428
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=430
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=432
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=484
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=433
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=435
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=485
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=487
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=491
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=492
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=493
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=498
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=499
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=501
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=502
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=503
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=504
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=506
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=507
AND published=1
SELECT COUNT(id) AS COUNT
FROM jos_joomgallery
WHERE published = 1
AND approved = 1
AND catid IN (410,412,416,420,426,431,434,486,490,500,505,411,417,418,419,422,421,423,424,427,429,428,430,432,484,433,435,485,487,491,492,493,498,499,501,502,503,504,506,507)
SELECT MAX(imgdate)
FROM jos_joomgallery AS a
LEFT JOIN jos_joomgallery_catg AS c
ON c.cid=a.catid
WHERE a.catid IN (280)
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 (280)
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 (281,291,295,313,322,334,352,368,391,397,401)
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 (281,291,295,313,322,334,352,368,391,397,401)
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 (282,283,292,293,296,306,320,318,316,324,328,325,332,337,350,339,355,353,366,364,369,371,381,385,387,389,394,392,395,396,399,402,404,403,405,407)
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 (282,283,292,293,296,306,320,318,316,324,328,325,332,337,350,339,355,353,366,364,369,371,381,385,387,389,394,392,395,396,399,402,404,403,405,407)
AND access <= 0
AND published = '1'
SELECT catpath
FROM jos_joomgallery_catg
WHERE cid= '392'
SELECT
*,
c.access
FROM
jos_joomgallery AS p
LEFT JOIN
jos_joomgallery_catg AS c
ON c.cid = p.catid
WHERE
p.catid = 392
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=280
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=281
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=291
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=295
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=313
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=322
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=334
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=352
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=368
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=391
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=397
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=401
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=282
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=283
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=292
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=293
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=296
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=306
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=320
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=318
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=316
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=321
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=324
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=328
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=325
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=329
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=332
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=337
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=350
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=339
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=355
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=353
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=366
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=364
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=369
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=371
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=381
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=385
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=387
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=389
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=394
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=392
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=395
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=396
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=399
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=402
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=404
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=403
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=405
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=407
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=408
AND published=1
SELECT COUNT(id) AS COUNT
FROM jos_joomgallery
WHERE published = 1
AND approved = 1
AND catid IN (280,281,291,295,313,322,334,352,368,391,397,401,282,283,292,293,296,306,320,318,316,321,324,328,325,329,332,337,350,339,355,353,366,364,369,371,381,385,387,389,394,392,395,396,399,402,404,403,405,407,408)
SELECT MAX(imgdate)
FROM jos_joomgallery AS a
LEFT JOIN jos_joomgallery_catg AS c
ON c.cid=a.catid
WHERE a.catid IN (27)
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 (27)
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 (133,146,190,203,220,245,260,266,270)
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 (133,146,190,203,220,245,260,266,270)
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 (141,149,178,191,199,194,200,204,241,234,225,221,246,248,247,249,252,251,250,253,254,255,258,256,257,262,261,268,276,271)
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 (141,149,178,191,199,194,200,204,241,234,225,221,246,248,247,249,252,251,250,253,254,255,258,256,257,262,261,268,276,271)
AND access <= 0
AND published = '1'
SELECT catpath
FROM jos_joomgallery_catg
WHERE cid= '241'
SELECT
*,
c.access
FROM
jos_joomgallery AS p
LEFT JOIN
jos_joomgallery_catg AS c
ON c.cid = p.catid
WHERE
p.catid = 241
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=27
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=133
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=146
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=190
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=203
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=220
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=245
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=260
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=266
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=270
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=141
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=149
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=177
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=178
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=191
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=199
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=194
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=200
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=204
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=213
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=241
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=236
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=234
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=225
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=221
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=246
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=248
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=247
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=249
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=252
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=251
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=250
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=253
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=254
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=255
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=258
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=256
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=257
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=262
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=261
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=268
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=276
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=271
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=277
AND published=1
SELECT COUNT(id) AS COUNT
FROM jos_joomgallery
WHERE published = 1
AND approved = 1
AND catid IN (27,133,146,190,203,220,245,260,266,270,141,149,177,178,191,199,194,200,204,213,241,236,234,225,221,246,248,247,249,252,251,250,253,254,255,258,256,257,262,261,268,276,271,277)
SELECT MAX(imgdate)
FROM jos_joomgallery AS a
LEFT JOIN jos_joomgallery_catg AS c
ON c.cid=a.catid
WHERE a.catid IN (31)
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 (31)
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 (121,92,594,68,71,73,66,47,42)
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 (121,92,594,68,71,73,66,47,42)
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 (46,43,44,48,91,67,86,70,88,75,74,85,93,124,126,125,123)
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 (46,43,44,48,91,67,86,70,88,75,74,85,93,124,126,125,123)
AND access <= 0
AND published = '1'
SELECT catpath
FROM jos_joomgallery_catg
WHERE cid= '125'
SELECT
*,
c.access
FROM
jos_joomgallery AS p
LEFT JOIN
jos_joomgallery_catg AS c
ON c.cid = p.catid
WHERE
p.catid = 125
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=31
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=121
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=92
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=594
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=68
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=71
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=73
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=66
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=47
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=42
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=126
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=125
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=93
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=124
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=123
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=86
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=70
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=88
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=75
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=74
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=85
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=91
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=67
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=48
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=46
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=43
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=44
AND published=1
SELECT COUNT(id) AS COUNT
FROM jos_joomgallery
WHERE published = 1
AND approved = 1
AND catid IN (31,121,92,594,68,71,73,66,47,42,126,125,93,124,123,86,70,88,75,74,85,91,67,48,46,43,44)
SELECT MAX(imgdate)
FROM jos_joomgallery AS a
LEFT JOIN jos_joomgallery_catg AS c
ON c.cid=a.catid
WHERE a.catid IN (32)
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 (32)
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 (64,94,480,76,106,96,62)
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 (64,94,480,76,106,96,62)
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 (63,108,65,119,105,117,77,95,97,115,114,107,120,112)
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 (63,108,65,119,105,117,77,95,97,115,114,107,120,112)
AND access <= 0
AND published = '1'
SELECT catpath
FROM jos_joomgallery_catg
WHERE cid= '63'
SELECT
*,
c.access
FROM
jos_joomgallery AS p
LEFT JOIN
jos_joomgallery_catg AS c
ON c.cid = p.catid
WHERE
p.catid = 63
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=32
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=64
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=94
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=480
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=76
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=106
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=96
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=62
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=108
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=65
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=119
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=105
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=117
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=95
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=112
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=77
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=114
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=107
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=120
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=97
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=115
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=63
AND published=1
SELECT COUNT(id) AS COUNT
FROM jos_joomgallery
WHERE published = 1
AND approved = 1
AND catid IN (32,64,94,480,76,106,96,62,108,65,119,105,117,95,112,77,114,107,120,97,115,63)
SELECT MAX(imgdate)
FROM jos_joomgallery AS a
LEFT JOIN jos_joomgallery_catg AS c
ON c.cid=a.catid
WHERE a.catid IN (33)
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 (33)
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 (131)
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 (131)
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 (111)
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 (111)
AND access <= 0
AND published = '1'
SELECT catpath
FROM jos_joomgallery_catg
WHERE cid= '111'
SELECT
*,
c.access
FROM
jos_joomgallery AS p
LEFT JOIN
jos_joomgallery_catg AS c
ON c.cid = p.catid
WHERE
p.catid = 111
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=33
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=131
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=111
AND published=1
SELECT COUNT(id) AS COUNT
FROM jos_joomgallery
WHERE published = 1
AND approved = 1
AND catid IN (33,131,111)
SELECT MAX(imgdate)
FROM jos_joomgallery AS a
LEFT JOIN jos_joomgallery_catg AS c
ON c.cid=a.catid
WHERE a.catid IN (34)
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 (34)
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 (58,59)
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 (58,59)
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 (60,61)
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 (60,61)
AND access <= 0
AND published = '1'
SELECT catpath
FROM jos_joomgallery_catg
WHERE cid= '60'
SELECT
*,
c.access
FROM
jos_joomgallery AS p
LEFT JOIN
jos_joomgallery_catg AS c
ON c.cid = p.catid
WHERE
p.catid = 60
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=34
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=58
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=59
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=60
AND published=1
SELECT cid
FROM jos_joomgallery_catg
WHERE parent=61
AND published=1
SELECT COUNT(id) AS COUNT
FROM jos_joomgallery
WHERE published = 1
AND approved = 1
AND catid IN (34,58,59,60,61)
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 = '445'
AND a.approved = '1'
AND c.access <= '0'
SELECT
name,
cid
FROM
jos_joomgallery_catg
WHERE
cid = '445'
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 = '445'
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 = '445'
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 = '445'
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