Created
April 2, 2013 20:13
-
-
Save ryanneufeld/5295765 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 'music' AS 'type', ms.`title` as title, ms.`slug` as slug, ms.`id` as id, ma.`name` as artist, ms.`like_count` as like_count | |
| FROM (`music_songs` ms,`music_artists` ma) | |
| WHERE (ma.name LIKE ? OR ms.title LIKE ?) | |
| AND ms.status = 1 | |
| AND ms.artist_id = ma.id | |
| ORDER BY ms.`like_count` DESC |
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 'music' AS 'type', ms.`title` as title, ms.`slug` as slug, ms.`id` as id, ma.`name` as artist, ms.`like_count` as like_count | |
| FROM `music_songs` ms JOIN `music_artists` ma ON ms.artist_id = ma.id | |
| WHERE (ma.name LIKE ? OR ms.title LIKE ?) | |
| AND ms.status = 1 | |
| ORDER BY ms.`like_count` DESC; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment