- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
"SELECT c.type AS type,
ELT(c.type, g.genre_id, l.label_id, f.film_id, a.actor_id, s.show_id, ch.channel_id,aw.award_id) AS id,
ELT(c.type, g.value, l.value, f.real_name, a.real_name, s.real_name, ch.name, aw.description) AS real_name,
ELT(c.type, NULL, NULL, f.name, a.name, s.name, NULL, NULL) AS name
FROM connector AS c
LEFT JOIN genres AS g ON (c.second = g.genre_id)
LEFT JOIN labels AS l ON (c.second = l.label_id)
LEFT JOIN films AS f ON (c.second = f.film_id)
LEFT JOIN actors AS a ON (c.second = a.actor_id)
LEFT JOIN shows AS s ON (c.second = s.show_id)
LEFT JOIN channels AS ch ON (c.second = ch.channel_id)
LEFT JOIN awards AS aw ON (c.second = aw.award_id)
WHERE c.first = ".$_SESSION['user_id']