Skip to content

Instantly share code, notes, and snippets.

@erochest
Created June 27, 2012 20:42
Show Gist options
  • Save erochest/3006751 to your computer and use it in GitHub Desktop.
Save erochest/3006751 to your computer and use it in GitHub Desktop.
What does this do?
SELECT `e`.*, `dt`.`name` AS `data_type_name`, `es`.`name` AS `set_name`, `rty`.`name` AS `record_type_name` FROM `hotchkiss_elements` AS `e`
LEFT JOIN `hotchkiss_data_types` AS `dt` ON dt.id = e.data_type_id
LEFT JOIN `hotchkiss_element_sets` AS `es` ON es.id = e.element_set_id
INNER JOIN `hotchkiss_record_types` AS `rty` ON rty.id = e.record_type_id WHERE (rty.name = 'Item' OR rty.name = "All") ORDER BY `e`.`order` ASC, `e`.`element_set_id` ASC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment