|
подскажите как переделать запрос под mySQL
|
|||
---|---|---|---|
#18+
Имеется запрос: SELECT id distinct from t1 where not exists(select ip from t2 where t1.id=t2.id) and not exists(select ip from t3 where t1.id=t3.id) and not exists(select ip from t4 where t1.id=t4.id) and not exists(select ip from t5 where t1.id=t5.id) но проблема в том, что mySQL не понимает вложенных подзапросов!!! как в моем случае это можно обойти? пишу на PHP + mySQL! ... |
|||
:
Нравится:
Не нравится:
|
|||
12.06.2001, 10:19 |
|
подскажите как переделать запрос под mySQL
|
|||
---|---|---|---|
#18+
Для того что бы обойти вложенные подзапросы, используй join см. мануал... ... |
|||
:
Нравится:
Не нравится:
|
|||
14.06.2001, 17:03 |
|
подскажите как переделать запрос под mySQL
|
|||
---|---|---|---|
#18+
SELECT distinct ip from t1 left join t2 (t1.id=t2.id) left join t3 (t1.id = t3.id) left join t4 (t1.id = t4.id) left join t5 (t1.id = t5.id) where (t2.id = NULL) AND (t3.id = NULL) AND (t4.id = NULL) AND (t5.id = NULL) ... |
|||
:
Нравится:
Не нравится:
|
|||
15.06.2001, 07:17 |
|
|
start [/forum/search_topic.php?author=Herblow&author_mode=last_topics&do_search=1]: |
0ms |
get settings: |
11ms |
get forum list: |
15ms |
get settings: |
12ms |
get forum list: |
15ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
46ms |
get topic data: |
10ms |
get forum data: |
3ms |
get page messages: |
35ms |
get tp. blocked users: |
1ms |
others: | 694ms |
total: | 850ms |
0 / 0 |