Created
February 9, 2009 16:50
-
-
Save henrikbjorn/60860 to your computer and use it in GitHub Desktop.
This file contains 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 `Message`.`id`, `Message`.`user_id`, `Message`.`sender_id`, `Message`.`status`, `Message`.`title`, `Message`.`body`, `Message`.`parent_id`, `Message`.`created`, `Message`.`modified`, `Sender`.`id`, `Sender`.`username`, `Sender`.`password`, `Sender`.`created`, `Sender`.`modified`, `Sender`.`active`, `Sender`.`validate_key`, `Sender`.`email`, `Sender`.`status`, `User`.`id`, `User`.`username`, `User`.`password`, `User`.`created`, `User`.`modified`, `User`.`active`, `User`.`validate_key`, `User`.`email`, `User`.`status` FROM `messages` AS `Message` LEFT JOIN `users` AS `Sender` ON (`Message`.`sender_id` = `Sender`.`id`) LEFT JOIN `users` AS `User` ON (`Message`.`user_id` = `User`.`id`) WHERE (`Message`.`user_id` = 11 OR `Message`.`sender_id` = 11) AND ((`Message`.`status` & 8) = 0) ORDER BY `Message`.`modified` DESC, `Message`.`status` DESC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment