Topic: Problem With Broadcast Email
Whenever I try to send out an e-mail to my users, I get this error:
An error was encountered
Error: Could not get user count from database.
any ideas?
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 troubleshooting → Problem With Broadcast Email
Whenever I try to send out an e-mail to my users, I get this error:
An error was encountered
Error: Could not get user count from database.
any ideas?
Yup. It couldn't get the user count from the db.
Enable debug mode and post the output.
how do i enable debug mode?
An error was encountered
File: /home/yougotli/public_html/yougotlinks/Forums/plugins/AP_Broadcast_Email.php
Line: 59
PunBB reported: Could not get user count from database
Database reported: ERROR: column "punbb_users.username" must appear in the GROUP BY clause or be used in an aggregate function
PgSQL database?
i tried changing line 55 to $sql = "SELECT count (username) AS usercount FROM ".$db->prefix."users WHERE username != 'Guest'"; like you said, and now it says
Parse error: syntax error, unexpected '"' in /home/yougotli/public_html/yougotlinks/Forums/plugins/AP_Broadcast_Email.php on line 56
Post lines 50 through to 60, within code blocks.
// Display the admin navigation menu
generate_admin_menu($plugin);
$preview_message_body = nl2br(pun_htmlspecialchars($_POST['message_body']));
$sql = "SELECT count (username) AS usercount FROM ".$db->prefix."users WHERE username != 'Guest'";
FROM ".$db->prefix."users
WHERE username != 'Guest'
ORDER BY username";
$result = $db->query($sql) or error('Could not get user count from database', __FILE__, __LINE__, $db->error());
$row = $db->fetch_assoc($result);
// Display the admin navigation menu
generate_admin_menu($plugin);
$preview_message_body = nl2br(pun_htmlspecialchars($_POST['message_body']));
$sql = "SELECT count (username) AS usercount FROM ".$db->prefix."users WHERE username != 'Guest'";
$result = $db->query($sql) or error('Could not get user count from database', __FILE__, __LINE__, $db->error());
$row = $db->fetch_assoc($result);
Thank you SOOOOOOO much MattF...I think that worked, it took me to the confirmation but I haven't sent it out yet.
Ok I'm trying to send the e-mail out...Seems to be taking forever...It says patience is key, so I suppose it takes this long... Probably because I have over 7,000+ users.
it went to a blank page...is that what it's suppose to do!?
Nope. It has probably timed out. Check the server logs just to make sure. Check the threads for that plugin, if it is due to a timeout, and not a code error. There's a workaround for it.
PunBB Forums → PunBB 1.2 troubleshooting → Problem With Broadcast Email
Powered by PunBB, supported by Informer Technologies, Inc.