I'm trying to debug a Pearl script that checks for posts in the moderation queue. It seems to be failing after not finding a field called "post_approved" which doesn't seem to exist in my phpbb3_posts field
Here's the relevant section of the script (I think).
# Check for Posts Needing Approval
$report_index = 0;
@col_titles[$report_index] = "Posts";
# Create a query of the data base.
$sql = "SELECT `poster_id`, `post_subject`, `post_text` FROM `phpbb_posts` WHERE post_approved=0";
# Give the data base a chance to prepare. Perhaps it will compile the request.
$sth = $dbh->prepare($sql);
# Run the query.
$sth->execute || die "Could not execute SQL statement ... maybe invalid?";
while (@row=$sth->fetchrow_array) {
$post_approval_count++;
$sql = "SELECT `username` FROM `phpbb_users` WHERE user_id=$row[0]";
$sth2 = $dbh->prepare($sql);
$sth2->execute || die "Could not execute SQL statement ... maybe invalid?";
here's the error message from the Pearl script
DBD::mysql::st execute failed: Unknown column 'post_approved' in 'where clause' at /home/modernde/moderation/moderator.pl line 42.
Could not execute SQL statement ... maybe invalid? at /home/modernde/moderation/moderator.pl line 42.
I ran the database upgrader when doing the manual php3.2 upgrade. It said that it completed successfully but maybe it just skipped over the field for some reason. don't really know if there is a log file I could check.