SELECT COUNT(id)
					FROM `page`
				   WHERE url = '' AND `visible` = 1
SELECT COUNT(id)
					FROM `page`
				   WHERE url = '' AND `visible` = 1
SELECT `url`
						FROM `page`
	 				   WHERE `home` = 1
SELECT `url`
						FROM `page`
	 				   WHERE `home` = 1
SELECT `id`, `class`, `title`, `meta_title`, `meta_keywords`, `meta_description`
					FROM `page` AS p
					
			   LEFT JOIN `meta` AS m
			   		  ON m.type_id = 1 AND m.instance_id = p.id
					
				   WHERE p.url = ''
SELECT `id`, `class`, `title`, `meta_title`, `meta_keywords`, `meta_description`
					FROM `page` AS p
					
			   LEFT JOIN `meta` AS m
			   		  ON m.type_id = 1 AND m.instance_id = p.id
					
				   WHERE p.url = ''
SELECT `id`, `title`, `url`, `visible`, `sort_order`
					FROM `navigation`
				   WHERE 1  AND `visible` = 1
				ORDER BY `sort_order` ASC
SELECT `tag`, `content` AS `replace_content`
					FROM `snippet`
				   WHERE 1
SELECT ph.id, ph.filename
					FROM `page-photo` as ph
					
					LEFT JOIN `page` AS pa
						   ON ph.page_id = pa.id
															
				   WHERE 1	
				    AND pa.url = ''

				ORDER BY ph.sort_order ASC
SELECT s.id, s.title, s.visible, s.image_filename, s.content, s.class, s.template_id, t.class, t.type, p.url AS `page_url`
					FROM `slide` AS s
			   
			   LEFT JOIN `page` AS p
			   		  ON s.page_id = p.id
			   		  
               LEFT JOIN `template` AS t
                      ON s.template_id = t.id
			   
				   WHERE 1
				    AND s.visible = 1
				ORDER BY s.sort_order ASC
SELECT `tag`, `content` AS `replace_content`
					FROM `snippet`
				   WHERE 1
SELECT `tag`, `content` AS `replace_content`
					FROM `snippet`
				   WHERE 1
Sammi Sparke Photography