ich habe mHv modify_topics meine postings um 7 input felder (q1-q7) erweitert.
Funktioniert auch ganz gut - bis auf eine Sache:
Aus irgendeinem Grund wird der Wert des ersten Inputfeldes (q1) in der DB im Feld des zweiten Inpufeldes (Q2) gespeichert und so weiter, also alle um ein Feld versetzt.
Nach einem Tag der Fehlersuche und des Neuaufsetzens bin ich leider noch nicht weiter - es MUSS ja in der functions_post.php oder der posting.php stecken, oder ?
posting.php:
Code: Alles auswählen
$select_sql = (!$submit) ? ", t.topic_title, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig, u.user_sig_bbcode_uid, pt.post_q1, pt.post_q2, pt.post_q3, pt.post_q4, pt.post_q5, pt.post_q6, pt.post_q7" : '';
functions_post.php:
Code: Alles auswählen
$sql = ($mode != "editpost") ? "INSERT INTO " . TOPICS_TABLE . " (forum_id, topic_title, topic_q1, topic_q2, topic_q3, topic_q4, topic_q5, topic_q6, topic_q7, topic_poster, topic_time, topic_status, topic_vote, topic_type ) VALUES ( $forum_id, '$post_subject', '$post_q1', '$post_q2', '$post_q3', '$post_q4', '$post_q5', '$post_q6', '$post_q7', " . $userdata['user_id'] . ", $current_time, " . TOPIC_UNLOCKED . ", $topic_vote, $topic_type)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type " . (($post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = " . $topic_vote : ", topic_q1 = '$post_q1', topic_q2 = '$post_q2', topic_q3 = '$post_q3', topic_q4 = '$post_q4', topic_q5 = '$post_q5', topic_q6 = '$post_q6', topic_q7 = '$post_q7'") . " WHERE topic_id = $topic_id";
Code: Alles auswählen
$sql = ($mode != 'editpost') ? "INSERT INTO " . POSTS_TEXT_TABLE . " (post_id, post_subject, bbcode_uid, post_text, post_q1, post_q2, post_q3, post_q4, post_q5, post_q6, post_q7) VALUES ($post_id, '$post_subject', '$bbcode_uid', '$post_message', '$post_q1', '$post_q2', '$post_q3', '$post_q4', '$post_q5', '$post_q6', '$post_q7')" : "UPDATE " . POSTS_TEXT_TABLE . " SET post_text = '$post_message', bbcode_uid = '$bbcode_uid', post_subject = '$post_subject', post_q1 = '$post_q1', post_q2 = '$post_q2', post_q3 = '$post_q3', post_q4 = '$post_q4', post_q5 = '$post_q5', post_q6 = '$post_q6', post_q7 = '$post_q7' WHERE post_id = $post_id";
Liegts evtl. an der Reihenfolge der SQL Parameter ?
Trage ich die Werte händisch in die DB ein werden sie auch richtig ausgegeben, schliesse template Probleme daher mal aus...aber wer weiss...