Code: Selecteer alles
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,k_id) VALUES ('test', 2, 1155928773, 1, 0, 0, 0, )
Line : 256
File : functions_post.php
echter op de online server gaat het allemaal tegen werken.
ik vermoed dat het fout zit in de database
dit is de stuk waar die naar verwijst
Code: Selecteer alles
if ($mode == 'editpost')
{
remove_search_post($post_id);
}
if ($mode == 'newtopic' || ($mode == 'editpost' && $post_data['first_post']))
{
$topic_vote = (!empty($poll_title) && count($poll_options) >= 2) ? 1 : 0;
$sql = ($mode != "editpost") ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote,k_id) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote, $k_id)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type " . (($post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = " . $topic_vote : "") . ", k_id=$k_id WHERE topic_id = $topic_id";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
}
if ($mode == 'newtopic')
{
$topic_id = $db->sql_nextid();
}
}