Messenger Stuff Community Forums

Full Version: PM Error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Heloo there, while trying to send a pm , i was encountred with a sql error,

I bet it's MySQL 5 causing the problem.


so to fix it please replace your private.php with this attached one

or follow as below

Find this (on line 218) in private.php


PHP Code:
$query $db->query("SELECT u.uid, u.username, u.email, u.usergroup, u.pmnotify, u.pmpopup, u.receivepms, u.ignorelist, u.lastactive, 
u.language, COUNT(pms.pmid) AS pms_total, g.canusepms, g.pmquota, g.cancp  FROM "
.TABLE_PREFIX."users u, ".TABLE_PREFIX."usergroups g 
LEFT JOIN "
.TABLE_PREFIX."privatemessages pms ON (pms.uid=u.uid) WHERE u.username='".addslashes($mybb->input['to'])."' AND 
g.gid=u.usergroup GROUP BY u.uid"
); 


replace it by

PHP Code:
$query $db->query("SELECT u.uid, u.username, u.email, u.usergroup, u.pmnotify, u.pmpopup, u.receivepms, u.ignorelist, u.lastactive, 
u.language, COUNT(pms.pmid) AS pms_total, g.canusepms, g.pmquota, g.cancp  FROM ("
.TABLE_PREFIX."users u, ".TABLE_PREFIX."usergroups g) 
LEFT JOIN "
.TABLE_PREFIX."privatemessages pms ON (pms.uid=u.uid) WHERE u.username='".addslashes($mybb->input['to'])."' AND 
g.gid=u.usergroup GROUP BY u.uid"
); 


many regards
Thank you zaher1988,
We will fix this ASAP, I saw this error before and I thaught it was just because we moved servers and added more security.
Keep up the good work ;)
yeh wow you've posted a lot of good mysql fixes :p
just for the sake of fixing them!! hope they are fixed!

regards
you should really get into talking in the other forums :p

you already made a lotta posts, theres a reqrds system for 20+ posters so maybe you could get upto that :p no spamming though(A)

welcome!
Fixed :)
Reference URL's