
Что делать?
Код: Выделить всё
$postrow = array();
Код: Выделить всё
// [begin] First Post On Every Page Mod
if ( $forum_topic_data['topic_show_first_post'] && ( $start != 0) )
{
$sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_allowsmile, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid
FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt
WHERE p.post_id = " . $forum_topic_data['topic_first_post_id'] . "
AND pt.post_id = p.post_id
AND u.user_id = p.poster_id";
if ( !($first_post_result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Could not obtain first post/user information.", '', __LINE__, __FILE__, $sql);
}
$postrow[] = $db->sql_fetchrow($first_post_result);
$db->sql_freeresult($first_post_result);
}
// [end] First Post On Every Page Mod
if ($row = $db->sql_fetchrow($result))
{
do
{
$postrow[] = $row;
}
while ($row = $db->sql_fetchrow($result));
$db->sql_freeresult($result);
$total_posts = count($postrow);
}
else
{
include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
sync('topic', $topic_id);
message_die(GENERAL_MESSAGE, $lang['No_posts_topic']);
}
Error in posting
DEBUG MODE
SQL Error : 1064 У вас ошибка в запросе. Изучите документацию по используемой версии MySQL на предмет корректного синтаксиса около ')' на строке 1
INSERT INTO phpbb_topics (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote, topic_show_first_post) VALUES ('всявс', 2, 1121085430, 1, 0, 0, 0, )
Line : 258
File : functions_post.php
$sql = ($mode != "editpost") ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote, topic_show_first_post) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote, $topic_show_first_post)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type, topic_show_first_post = '$topic_show_first_post' " . (($post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = " . $topic_vote : "") . " WHERE topic_id = $topic_id";
if (!$db->sql_query($sql))
Код: Выделить всё
Error in posting
DEBUG MODE
SQL Error : 1064 You have an error in your SQL syntax near ')' at line 1
INSERT INTO phpbb_topics (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote, topic_show_first_post) VALUES ('Тест на первое сообщение в теме', 2, 1121333590, 3, 0, 0, 0, )
Line : 258
File : functions_post.php
Код: Выделить всё
, &$topic_show_first_post