Forum_MAster
Постоялец
- Регистрация
- 18 Фев 2008
- Сообщения
- 122
- Реакции
- 4
- Автор темы
- #1
короче когда перехожу на ?do=lastcomments вылетает такая ошибка
вот содержимое файла
как подправить?
Код:
MySQL Error!
------------------------
The Error returned was:
Column 'thanks_num' in field list is ambiguous
Error Number:
1052
SELECT dle_comments.id, post_id, dle_comments.user_id, dle_comments.date, dle_comments.autor as gast_name, dle_comments.email as gast_email, text, ip, is_register, name, dle_users.email, news_num, dle_users.comm_num, user_group, reg_date, signature, foto, fullname, land, icq, thanks_num, thanks_sayed, ur_plus, ur_minus, dle_users.xfields as xprofile, dle_post.title, dle_post.date as newsdate, dle_post.alt_name, dle_post.category, dle_post.flag FROM dle_comments LEFT JOIN dle_post ON dle_comments.post_id=dle_post.id LEFT JOIN dle_users ON dle_comments.user_id=dle_users.user_id ORDER BY date desc LIMIT 0,30
вот содержимое файла
Код:
$sql_comm = "SELECT " . PREFIX . "_comments.id, post_id, " . PREFIX . "_comments.user_id, " . PREFIX . "_comments.date, " . PREFIX . "_comments.autor as gast_name, " . PREFIX . "_comments.email as gast_email, text, ip, is_register, name, " . USERPREFIX . "_users.email, news_num, " . USERPREFIX . "_users.comm_num, user_group, reg_date, signature, foto, fullname, land, icq, thanks_num, thanks_sayed, ur_plus, ur_minus, " . USERPREFIX . "_users.xfields as xprofile, " . PREFIX . "_post.title, " . PREFIX . "_post.date as newsdate, " . PREFIX . "_post.alt_name, " . PREFIX . "_post.category, " . PREFIX . "_post.flag FROM " . PREFIX . "_comments LEFT JOIN " . PREFIX . "_post ON " . PREFIX . "_comments.post_id=" . PREFIX . "_post.id LEFT JOIN " . USERPREFIX . "_users ON " . PREFIX . "_comments.user_id=" . USERPREFIX . "_users.user_id ".$where." ORDER BY date desc LIMIT ".$cstart.",".$number;
$sql_count = "SELECT COUNT(*) as count FROM " . PREFIX . "_comments LEFT JOIN " . PREFIX . "_post ON " . PREFIX . "_comments.post_id=" . PREFIX . "_post.id ".$where;
как подправить?