Seite 1 von 1

Problem beim editieren von Polls / Umfragen

Verfasst: 08.08.2006 12:38
von Lux
Moin,

wenn ich nachträglich eine vorhandene Umfrage per EDIT-Funktion ein Ende bereiten will, sprich die Dauer der Umfrage (z.B. 3 Tage) einstellen will, bekomme ich folgende Fehlermeldung, woran könnte das liegen?

Code: Alles auswählen

Error in posting

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'topic_id = 3280' at line 1

UPDATE phpbb_topics SET topic_title = Bla Bla Bla', topic_type = 0 , topic_vote = 1WHERE topic_id = 3280

Line : 256
File : functions_post.php

Verfasst: 08.08.2006 12:39
von punkface
Hallo

Verlink mal die functions_post.php als .txt-Datei (siehe: KB:datei)

Verfasst: 08.08.2006 18:45
von Lux

Verfasst: 08.08.2006 21:41
von SynN

Code: Alles auswählen

FIND:
		$sql  = ($mode != "editpost") ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type " . (($post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = " . $topic_vote : "") . "WHERE topic_id = $topic_id";


REPLACE WITH:
		$sql  = ($mode != "editpost") ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type " . (($post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = " . $topic_vote : "") . " WHERE topic_id = $topic_id";
sollte helfen

Verfasst: 09.08.2006 06:40
von Lux
Pefekt!

Vielen Dank!!! :grin: