|
|
|
| Добрый день.
Получаю от mysql ошибку в ответ на такой запрос:
SELECT comments.id_comment, comments.author, comments.type, comments.poryad, pictures.name
FROM comments AS cs, pictures AS ps
ORDER BY poryad
|
При том, что такой -
SELECT comments.id_comment, comments.author, comments.type, comments.poryad, pictures.name
FROM comments, pictures
ORDER BY poryad
|
- вполне срабатывает. Ошибка странная: Unknown table 'comments' in field list.
В чем может быть проблема? Mysql версии 4.1.8 - может, в ней еще нет псевдонимов для таблиц? | |
|
|
|
|
|
|
|
для: AlexHog
(17.11.2006 в 13:16)
| | Следует использовать псевдонимы таблиц при обращении к столбцам
SELECT cs.id_comment, cs.author, cs.type, cs.poryad, ps.name
FROM comments AS cs, pictures AS ps
ORDER BY poryad
|
| |
|
|
|