Code: Select all
phpBB : Critical Error
Could not select posts count forum total
DEBUG MODE
SQL Error : 1064 You have an error in your SQL syntax near '' at line 3
SELECT COUNT(post_id) as numrows FROM phpbb_posts WHERE forum_id =
Line : 1191
File : /path/to/phpBB2/admin/admin_prune_user_posts.php
afx114 wrote: Sure enough, I turned set "Adjust Post Counts" to NO and everything runs as planned without the PHP error. Looks like there's a bug in that SQL:
SELECT COUNT(post_id) as numrows FROM phpbb_posts WHERE forum_id =
forum_id is not defined.
R45 wrote: Okay, could not reproduce error. The only way this could happen is if your forums table has some bad entries OR a post in your database has an invalid forum entry in a post record, at first glance. I'll do some more code testing, but do you have any MODs on your forum?
Code: Select all
SELECT * FROM phpbb_posts WHERE forum_id IS NULL
R45 wrote: Can you try
And see if you get any problems?Code: Select all
SELECT * FROM phpbb_posts WHERE forum_id IS NULL
afx114 wrote: P.S., that is a NOT NULL column in the DB, so a row with NULL in that column cannot be inserted.
Code: Select all
$sql = "SELECT forum_id
FROM ".FORUMS_TABLE;
Code: Select all
$sql_array[] = "SELECT p.post_id, p.topic_id, p.poster_id, p.forum_id, t.topic_poster, t.topic_vote, t.topic_first_post_id, t.topic_last_post_id
FROM ".POSTS_TABLE." as p, ".TOPICS_TABLE." as t
".$where_sql." AND p.poster_id = ".$users[$i]['user_id'];
Code: Select all
$sql_array[] = "SELECT p.post_id, p.topic_id, p.poster_id, p.forum_id, t.topic_poster, t.topic_vote, t.topic_first_post_id, t.topic_last_post_id
FROM ".POSTS_TABLE." as p, ".TOPICS_TABLE." as t
".$where_sql.$ip_sql;
Code: Select all
function sql_query($query = "", $transaction = false)
{
Code: Select all
global $query_cache;
$query_cache .= "<pre>$query</pre><br /><br />";
Code: Select all
$db->sql_close();
Code: Select all
global $query_cache;
echo $query_cache;
Code: Select all
SELECT *
FROM phpbb_config
SELECT u.*, s.*
FROM phpbb_sessions s, phpbb_users u
WHERE s.session_id = '014da822b28d25132118ff374aabf88b'
AND u.user_id = s.session_user_id
UPDATE phpbb_sessions
SET session_time = 1076619523, session_page = 0
WHERE session_id = '014da822b28d25132118ff374aabf88b'
UPDATE phpbb_users
SET user_session_time = 1076619523, user_session_page = 0
WHERE user_id = 2
DELETE FROM phpbb_sessions
WHERE session_time < 1076615923
AND session_id <> '014da822b28d25132118ff374aabf88b'
SELECT *
FROM phpbb_themes
WHERE themes_id = 2
SELECT group_id, group_name
FROM phpbb_groups
WHERE group_single_user = 0
ORDER BY group_name
SELECT COUNT(ban_id) as numrows
FROM phpbb_banlist
WHERE ban_userid <> 0
SELECT COUNT(ban_id) as numrows
FROM phpbb_banlist
WHERE ban_userid = 0
SELECT cat_id, cat_title
FROM phpbb_categories
ORDER BY cat_order ASC
SELECT forum_id, forum_name
FROM phpbb_forums
WHERE cat_id = 2
ORDER BY forum_order ASC
Code: Select all
<html><body></body></html>
R45 wrote: Re changing the default checkings, well "All Users" is not checked by default. A confirmation box might be useful indeed.