nikita
User
 Junior Boarder
| Posts: 17 |   | Karma: 0 |
|
Баг или фича?
|
|
Posted: 2007/05/17 10:36 |
|
|
|
|
Дмитрий, добрый день.
D2007 MySQL 5.1 WinXP
Ситуация такая:
не работает: (возвращает пустой результат, ошибки не выдаёт) SELECT CONCAT(author_type, ': ', author_family, ' ', author_initial, ' ', author_extension) as author2 FROM authors, volume2author WHERE volume2author.author_id=authors.author_id AND volume2author.volume_id='1743' AND author_type_id!=2 AND author_type_id!=1 ORDER BY author_prioritet DESC, author_family ASC
работает: SELECT CONCAT(author_type, ': ', author_family, ' ', author_initial, ' ', author_extension) as author2 FROM authors, volume2author WHERE volume2author.author_id=authors.author_id AND volume2author.volume_id='1743' AND author_type_id not in (1,2) ORDER BY author_prioritet DESC, author_family ASC
т.е. заменяем author_type_id!=2 AND author_type_id!=1 на author_type_id not in (1,2) и начинает работать
но при этом оба запроса верные и в phpMyAdmin отрабатывают на ура и работали на corelab mydac.
Баг или фича?
Post edited by: nikita, at: 2007/05/17 10:38
|
|