- 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']
Lure Of Chaos 14.01.2011 17:24 # −1
но использование ELT - это что-то новенькое ))
алсо, похапе детектед в #13
Анонимус 16.01.2011 09:33 # +1
это не скул
это пхп