Seite 1 von 2

Quiz Mod (functions_post.php)

Verfasst: 22.07.2004 01:20
von Andy120
Wie muss ich das beheben?

Code: Alles auswählen

Error in posting

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax near '/ ADDED , topic_quiz AND , 0 BY Quiz Hack)' at line 1

INSERT INTO phpbb_topics (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote, topic_quiz) VALUES ('Test', 2, 1090452078, 48, 0, 0, 0, 0// ADDED , topic_quiz AND , 0 BY Quiz Hack)

Line : 264
File : /var/www/web102/html/index/phpbb2.0.6/includes/functions_post.php

Verfasst: 22.07.2004 01:36
von Fabse
Ersetze

Code: Alles auswählen

INSERT INTO phpbb_topics (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote, topic_quiz) VALUES ('Test', 2, 1090452078, 48, 0, 0, 0, 0// ADDED , topic_quiz AND , 0 BY Quiz Hack)
mit

Code: Alles auswählen

INSERT INTO phpbb_topics (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote, topic_quiz) VALUES ('Test', 2, 1090452078, 48, 0, 0, 0, 0)

Verfasst: 22.07.2004 01:47
von Andy120
Bei mir siehts aber so aus....

Code: Alles auswählen

"INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote, topic_quiz) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote, " . ( empty($post_data['topic_quiz']) ? '0' : '1' ) . "// ADDED , topic_quiz AND , " . ( empty($post_data['topic_quiz']) ? '0' : '1' ) . " BY Quiz Hack)" : "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";
		if (!$db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);

Verfasst: 22.07.2004 01:51
von Fabse

Code: Alles auswählen

"INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote, topic_quiz) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote, " . ( empty($post_data['topic_quiz']) ? '0' : '1' ) . : "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"; 
      if (!$db->sql_query($sql)) 
      { 
         message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
Nochmals editiert!

Verfasst: 22.07.2004 01:55
von Andy120
Kommt immer noch der Fehler :cry:

Verfasst: 22.07.2004 01:57
von Fabse
Auch mit dem Editiertem?

Wenn ja poste mal ein bisschen mehr! +- 5 Zeilen

Verfasst: 22.07.2004 01:59
von Andy120
Also :D Hier....

Code: Alles auswählen

		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, topic_quiz) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote, " . ( empty($post_data['topic_quiz']) ? '0' : '1' ) . ", topic_quiz AND , " . ( empty($post_data['topic_quiz']) ? '0' : '1' ) . " BY Quiz Hack)" : "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";
      if (!$db->sql_query($sql))
      {
         message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
		}

		if ($mode == 'newtopic')
		{
			$topic_id = $db->sql_nextid();
		}
	}

Verfasst: 22.07.2004 02:02
von Fabse
Der nächste Versuch:

Code: Alles auswählen

"INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote, topic_quiz) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote, " . ( empty($post_data['topic_quiz']) ? '0' : '1' ) . "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"; 

Verfasst: 22.07.2004 02:09
von Andy120
Jetzt kommt folgende meldung....

Code: Alles auswählen

Parse error: parse error in /var/www/web102/html/index/phpbb2.0.6/includes/functions_post.php on line 261

Warning: Cannot modify header information - headers already sent by (output started at /var/www/web102/html/index/phpbb2.0.6/includes/functions_post.php:261) in /var/www/web102/html/index/phpbb2.0.6/includes/sessions.php on line 318

Warning: Cannot modify header information - headers already sent by (output started at /var/www/web102/html/index/phpbb2.0.6/includes/functions_post.php:261) in /var/www/web102/html/index/phpbb2.0.6/includes/sessions.php on line 319

Warning: Empty regular expression in /var/www/web102/html/index/phpbb2.0.6/includes/functions_post.php on line 102

Fatal error: Call to undefined function: submit_post() in /var/www/web102/html/index/phpbb2.0.6/posting.php on line 565
Edit

Kann den keiner Helfen... Fehler habe ich wieder rüchgängig gemacht, diesen da oben...

Verfasst: 22.07.2004 09:57
von Markus67
Hi ...

suche:

Code: Alles auswählen

"INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote, topic_quiz) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote, " . ( empty($post_data['topic_quiz']) ? '0' : '1' ) . "// ADDED , topic_quiz AND , " . ( empty($post_data['topic_quiz']) ? '0' : '1' ) . " BY Quiz Hack)" : "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"; 
      if (!$db->sql_query($sql)) 
      { 
         message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
ersetze mit:

Code: Alles auswählen

"INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote, topic_quiz) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote, " . ( empty($post_data['topic_quiz']) ? '0' : '1' ) . ")" : "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";
     if (!$db->sql_query($sql))
      {
	 message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
      }
Markus