Code: Alles auswählen
$sql = (!$post_data['has_poll']) ? "INSERT INTO " . VOTE_DESC_TABLE . " (topic_id, vote_text, vote_start, vote_length, show_endtime, show_results) VALUES ($topic_id, '$poll_title', $current_time, " . ($poll_length * 86400) . ", $show_endtime, $show_results)" : "UPDATE " . VOTE_DESC_TABLE . " SET vote_text = '$poll_title', vote_length = " . ($poll_length * 86400). ", show_endtime = $show_endtime, show_results = $show_results, WHERE topic_id = $topic_id";