aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_forums.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-03-26 11:36:54 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-03-26 11:36:54 +0000
commit1e895071d409313f2a2f8083da2fe05a123e18fe (patch)
tree477c10f3a4623ebd786f417fc76cd8da27292260 /phpBB/includes/acp/acp_forums.php
parent8a32e0de742d9d4fd453402a48889bc6edd6a7f9 (diff)
downloadforums-1e895071d409313f2a2f8083da2fe05a123e18fe.tar
forums-1e895071d409313f2a2f8083da2fe05a123e18fe.tar.gz
forums-1e895071d409313f2a2f8083da2fe05a123e18fe.tar.bz2
forums-1e895071d409313f2a2f8083da2fe05a123e18fe.tar.xz
forums-1e895071d409313f2a2f8083da2fe05a123e18fe.zip
ok, this should work now (multi-table deletion syntax changed between mysql 4.0 and mysql 4.1)
git-svn-id: file:///svn/phpbb/trunk@5728 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp/acp_forums.php')
-rw-r--r--phpBB/includes/acp/acp_forums.php28
1 files changed, 14 insertions, 14 deletions
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php
index cc9df44f62..306f11ad8a 100644
--- a/phpBB/includes/acp/acp_forums.php
+++ b/phpBB/includes/acp/acp_forums.php
@@ -1328,25 +1328,25 @@ class acp_forums
// Delete everything else and thank MySQL for offering multi-table deletion
$tables_ary = array(
- SEARCH_MATCH_TABLE => 'wm.post_id',
- REPORTS_TABLE => 're.post_id',
- WARNINGS_TABLE => 'wt.post_id',
- BOOKMARKS_TABLE => 'bm.topic_id',
- TOPICS_WATCH_TABLE => 'tw.topic_id',
- TOPICS_POSTED_TABLE => 'tp.topic_id',
- POLL_OPTIONS_TABLE => 'po.topic_id',
- POLL_VOTES_TABLE => 'pv.topic_id',
+ SEARCH_MATCH_TABLE => 'post_id',
+ REPORTS_TABLE => 'post_id',
+ WARNINGS_TABLE => 'post_id',
+ BOOKMARKS_TABLE => 'topic_id',
+ TOPICS_WATCH_TABLE => 'topic_id',
+ TOPICS_POSTED_TABLE => 'topic_id',
+ POLL_OPTIONS_TABLE => 'topic_id',
+ POLL_VOTES_TABLE => 'topic_id',
);
- $sql = 'DELETE ';
- $sql_using = "\nFROM " . POSTS_TABLE . ' p';
- $sql_where = "\nWHERE p.forum_id = $forum_id\n";
+ $sql = 'DELETE ' . POSTS_TABLE;
+ $sql_using = "\nFROM " . POSTS_TABLE;
+ $sql_where = "\nWHERE " . POSTS_TABLE . ".forum_id = $forum_id\n";
foreach ($tables_ary as $table => $field)
{
-// $sql .= ", $table " . strtok($field, '.');
- $sql_using .= ", $table " . strtok($field, '.');
- $sql_where .= "\nAND $field = p." . strtok('');
+ $sql .= ", $table ";
+ $sql_using .= ", $table ";
+ $sql_where .= "\nAND $table.$field = " . POSTS_TABLE . ".$field";
}
$db->sql_query($sql . $sql_using . $sql_where);