Created
October 20, 2011 20:46
-
-
Save shofetim/1302335 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT count(distinct(`Form`.`id`)) as numberof | |
| FROM `forms` AS Form | |
| LEFT JOIN forms_tags AS `FormsTags` ON (`Form`.`id` = `FormsTags`.`form_id`) | |
| LEFT JOIN tags AS `Tag` ON (`FormsTags`.`tag_id` = `Tag`.`id`) | |
| LEFT JOIN `statuses` AS `Status` ON (`Form`.`status_id` = `Status`.`id`) | |
| LEFT JOIN `form_types` AS `FormType` ON (`Form`.`form_type_id` = `FormType`.`id`) | |
| LEFT JOIN `summaries` AS `Summary` ON (`Form`.`summary_id` = `Summary`.`id`) | |
| WHERE ((`Form`.`title` LIKE '%titl%') OR (`Tag`.`title` LIKE '%titl%')) ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment