need to join table on based of condition in mysql -
i want integrate functionality in ios/android app. developing service that. question : have table called songs in have song details
**like** song song_id station_id song_file
so on. have second table called userlike user inforamation stored.
**userlike** user_id song_id
my main problem want return song details value information particular user.if uer has not may send 'zero' or null in json. how build query? need song data , value if user has liked it.
try this
select s.song, s.song_id song s , userlike u u.user_id = userid;
Comments
Post a Comment