// // //
//

Заходи коледжу (30)

Сторінки: 1 2 Наступна Остання
Час генерації сторінки: 1.3185 сек.
Запити до бази: 151
SET NAMES cp1251

SELECT * FROM cms_menu ORDER BY id ASC

SELECT id, title, link, config, internal, published, version, system FROM cms_components

SELECT p.id, p.plugin, p.config, e.event FROM cms_plugins p, cms_event_hooks e WHERE p.published = 1 AND e.plugin_id = p.id

SELECT id FROM cms_user_groups WHERE alias = 'guest'

DELETE FROM cms_online WHERE lastdate <= DATE_SUB(NOW(), INTERVAL 3 MINUTE)

SELECT id as getfield FROM cms_online WHERE sess_id = 'dm4f72hr8tii0mk9te09ie1g84' AND ip = '54.158.214.111' LIMIT 1

INSERT INTO cms_online (ip, sess_id, lastdate, user_id, agent, viewurl) VALUES ('54.158.214.111', 'dm4f72hr8tii0mk9te09ie1g84', NOW(), '0', 'CCBot/2.0 (http://commoncrawl.org/faq/)', '/photos/1042')

SELECT id FROM cms_stats WHERE (ip = '54.158.214.111' AND page = '/photos/1042')

INSERT INTO cms_stats (ip, logdate, page, agent, refer) VALUES ('54.158.214.111', NOW(), '/photos/1042', 'CCBot/2.0 (http://commoncrawl.org/faq/)', '')

SELECT NSLeft, NSRight FROM cms_menu WHERE id = '20'

SELECT id, title, link, linktype
                           FROM cms_menu
                           WHERE NSLeft <= 36 AND NSRight >= 41 AND parent_id > 0
                           ORDER BY NSLeft

SELECT id, title FROM cms_photo_albums WHERE parent_id=0 AND NSDiffer='' ORDER BY id ASC LIMIT 1

SELECT * FROM cms_photo_albums WHERE id = '1042' ORDER BY id ASC LIMIT 1

SELECT id, title, NSLevel FROM cms_photo_albums WHERE NSLeft <= 64 AND NSRight >= 157 AND parent_id > 0 AND NSDiffer = '' ORDER BY NSLeft

SELECT NSDiffer as getfield FROM cms_photo_albums WHERE id='1042' LIMIT 1

SELECT a.*, IFNULL(COUNT(f.id), 0) as content_count
                FROM cms_photo_albums a
                LEFT JOIN cms_photo_files f ON f.album_id = a.id AND f.published = 1
                WHERE (a.parent_id=1042) AND a.published = 1 AND a.NSDiffer = ''
                GROUP BY a.id
                ORDER BY pubdate desc

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 155 AND NSRight < 156

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1176 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1176
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 153 AND NSRight < 154

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1174 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1174
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 151 AND NSRight < 152

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1172 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1172
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 149 AND NSRight < 150

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1166 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1166
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 147 AND NSRight < 148

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1165 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1165
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 145 AND NSRight < 146

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1164 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1164
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 143 AND NSRight < 144

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1160 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1160
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 141 AND NSRight < 142

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1154 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1154
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 139 AND NSRight < 140

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1149 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1149
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 137 AND NSRight < 138

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1148 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1148
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 135 AND NSRight < 136

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1147 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1147
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 133 AND NSRight < 134

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1144 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1144
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 129 AND NSRight < 130

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1131 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1131
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 127 AND NSRight < 128

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1129 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1129
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 121 AND NSRight < 126

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1126 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1126
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 119 AND NSRight < 120

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1125 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1125
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 117 AND NSRight < 118

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1124 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1124
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 115 AND NSRight < 116

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1122 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1122
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 113 AND NSRight < 114

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1119 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1119
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 111 AND NSRight < 112

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1118 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1118
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 109 AND NSRight < 110

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1116 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1116
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 107 AND NSRight < 108

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1113 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1113
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 105 AND NSRight < 106

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1111 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1111
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 131 AND NSRight < 132

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1108 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1108
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 103 AND NSRight < 104

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1104 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1104
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 101 AND NSRight < 102

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1100 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1100
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 95 AND NSRight < 100

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1098 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1098
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 93 AND NSRight < 94

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1096 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1096
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 91 AND NSRight < 92

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1095 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1095
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 89 AND NSRight < 90

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1089 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1089
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 87 AND NSRight < 88

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1083 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1083
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 85 AND NSRight < 86

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1079 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1079
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 83 AND NSRight < 84

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1077 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1077
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 81 AND NSRight < 82

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1076 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1076
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 79 AND NSRight < 80

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1072 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1072
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 77 AND NSRight < 78

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1060 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1060
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 73 AND NSRight < 76

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1059 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1059
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 71 AND NSRight < 72

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1057 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1057
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 69 AND NSRight < 70

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1056 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1056
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 67 AND NSRight < 68

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1052 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1052
				ORDER BY RAND()
				LIMIT 1

SELECT 1 FROM cms_photo_albums WHERE NSLeft > 65 AND NSRight < 66

SELECT COUNT(id) as getfield FROM cms_photo_files WHERE DATE_FORMAT(pubdate, '%d-%m-%Y') = '22-11-2017' AND album_id=1050 LIMIT 1

SELECT f.file
				FROM cms_photo_files f, cms_photo_albums a
				WHERE f.published = 1 AND f.album_id = a.id AND f.album_id = 1050
				ORDER BY RAND()
				LIMIT 1

SELECT f.*,
                            IFNULL(r.total_rating, 0) as rating
					FROM cms_photo_files f
					LEFT JOIN cms_ratings_total r ON r.item_id=f.id AND r.target='photo'
					WHERE f.album_id = 1042  AND f.published = 1
					 ORDER BY pubdate desc 
LIMIT 0, 20

SELECT 1 FROM cms_photo_files WHERE album_id = 1042

SELECT m.access_list
            FROM cms_modules m, cms_modules_bind mb
            WHERE mb.position = 'top' AND
                  m.published = 1 AND
                  m.id = mb.module_id AND
                  (mb.menu_id = '20' OR mb.menu_id = 0)
                  AND (m.is_strict_bind = 0)

SELECT m.access_list
            FROM cms_modules m, cms_modules_bind mb
            WHERE mb.position = 'sidebar' AND
                  m.published = 1 AND
                  m.id = mb.module_id AND
                  (mb.menu_id = '20' OR mb.menu_id = 0)
                  AND (m.is_strict_bind = 0)

SELECT *, m.id as mid, m.template as tpl
            FROM cms_modules m, cms_modules_bind mb
            WHERE (mb.position = 'topmenu') AND
                  m.published = 1 AND
                  m.id = mb.module_id AND
                  (mb.menu_id = '20' OR mb.menu_id = 0)
                  AND (m.is_strict_bind = 0)
            ORDER BY m.ordering ASC

SELECT NSLeft, NSRight, NSLevel FROM cms_menu WHERE id = '20' ORDER BY id ASC LIMIT 1

SELECT id as getfield FROM cms_menu WHERE parent_id=0 LIMIT 1

SELECT * FROM cms_menu WHERE id = 1 AND NSDiffer = ''

SELECT * FROM cms_menu WHERE NSLeft > 1 AND NSRight < 64 AND NSDiffer = '' ORDER BY NSLeft,ordering

SELECT *, m.id as mid, m.template as tpl
            FROM cms_modules m, cms_modules_bind mb
            WHERE (mb.position = 'maintop') AND
                  m.published = 1 AND
                  m.id = mb.module_id AND
                  (mb.menu_id = '20' OR mb.menu_id = 0)
                  AND (m.is_strict_bind = 0)
            ORDER BY m.ordering ASC

SELECT *, m.id as mid, m.template as tpl
            FROM cms_modules m, cms_modules_bind mb
            WHERE (mb.position = 'mainbottom') AND
                  m.published = 1 AND
                  m.id = mb.module_id AND
                  (mb.menu_id = '20' OR mb.menu_id = 0)
                  AND (m.is_strict_bind = 0)
            ORDER BY m.ordering ASC