Posted By

karthi on 02/22/12


Tagged

images player - agent


Versions (?)

(Player - Player Agent) Images


 / Published in: MySQL
 

(Player - Player Agent) Images

  1. SELECT asub.*,pr.type,
  2. CASE
  3. WHEN pr.type='player' THEN (SELECT image FROM football_player_list WHERE user_id = pr.id)
  4. WHEN pr.type='player_agent' THEN (SELECT image FROM player_agent_list WHERE user_id = pr.id)
  5. ELSE '-' END as user_images
  6. FROM `agent_subscribe` as asub INNER JOIN profile as pr ON asub.member_id = pr.id WHERE player_id = 1

Report this snippet  

You need to login to post a comment.