02-10-2006, 10:29 PM
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
replace it by
many regards
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



