Chodzi mi oto, żeby mieć tak jak na SS'ie który dałem.
Zrobiłem wszystko tak jak podał Ojciec Dyrektor ale pojawia się taki błąd.
Couldn't update forum information
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 ' forum_status = 0, forum_sort = 'SORT_FPDATE', password = '', forum_color = '', ' at line 2
UPDATE phpbb_forums SET forum_name = 'Muzyka', cat_id = 7, forum_desc = '', forum_image_url = 'link_folder',, forum_status = 0, forum_sort = 'SORT_FPDATE', password = '', forum_color = '', forum_moderate = 0, locked_bottom = 1, no_count = 0, forum_trash = 0, forum_separate = 2, forum_show_ga = 1, forum_tree_req = 0, forum_tree_grade = 3, forum_no_helped = 0, forum_no_split = 0, topic_tags = '', prune_enable = 0, forum_link='', forum_link_internal=0, forum_link_hit_count=0, main_type = 'c' WHERE forum_id = 44
Line : 999
File : admin_forums.php
A tutaj jest wycinek z admin_forums (od 978 do 1007):
}
$sql = "SELECT cat_id
FROM " . CATEGORIES_TABLE . "
WHERE cat_id = $cat_id";
if ( (!$result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't get forum data", "", __LINE__, __FILE__, $sql);
}
$crow = $db->sql_fetchrow($result);
if ( $crow['cat_id'] ==! $cat_id && $cat_id == $up_forum_id )
{
message_die(GENERAL_MESSAGE, $lang['Wrong_category']);
}
$sql = "UPDATE " . FORUMS_TABLE . "
SET forum_name = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', cat_id = $cat_id, forum_desc = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', forum_image_url = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumimageurl']) . "',, forum_status = " . intval($HTTP_POST_VARS['forumstatus']) . ", forum_sort = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumsort']) . "', password = '" . str_replace("\'", "''", $HTTP_POST_VARS['password']) . "', forum_color = '" . str_replace("\'", "''", str_replace("#", "", $HTTP_POST_VARS['forum_color'])) . "', forum_moderate = $post_moderate, locked_bottom = $locked_bottom, no_count = $post_no_count, forum_trash = $forum_trash, forum_separate = " . intval($HTTP_POST_VARS['forum_separate']) . ", forum_show_ga = " . intval($HTTP_POST_VARS['forum_show_ga']) . ", forum_tree_req = " . intval($HTTP_POST_VARS['forum_tree_req']) . ", forum_tree_grade = " . intval($HTTP_POST_VARS['forum_tree_grade']) . ", forum_no_helped = " . intval($HTTP_POST_VARS['forum_no_helped']) . ", forum_no_split = " . intval($HTTP_POST_VARS['forum_no_split']) . ", topic_tags = '" . str_replace("\'", "''", $HTTP_POST_VARS['topic_tags']) . "', prune_enable = " . intval($HTTP_POST_VARS['prune_enable']) . $field_value_sql . "
WHERE forum_id = $up_forum_id";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't update forum information", "", __LINE__, __FILE__, $sql);
}
sql_cache('clear', 'multisqlcache_forum');
sql_cache('clear', 'forum_data');
sql_cache('clear', 'moderators_list');
if( $HTTP_POST_VARS['prune_enable'] == 1 )
{
Co jest w tym źle zrobione że pojawia się taki błąd.
Użytkownik Blagom edytował ten post 05.08.2011 10:33