Changelog
2.0
Rewrote some parts and included (hopefully) all feature requests
- Search is now on a single page
- Usergroup permission added
- (Little to) no template changes necessary
- Should hopefully work with other pm addons like pm preview etc without additional template changes (not tested)
Installed the mod and love it, but some of our users recently started reporting that both Search functions are inoperable. If they try to use them, they get the following errors:
Search by Username:
Quote:
Database error in vBulletin 3.6.8:
Invalid SQL:
SELECT pm.*, pmtext.*
, icon.title AS icontitle, icon.iconpath
FROM pm AS pm
LEFT JOIN pmtext AS pmtext ON(pmtext.pmtextid = pm.pmtextid)
LEFT JOIN icon AS icon ON(icon.iconid = pmtext.iconid)
WHERE pm.userid=4877
AND pm.folderid= AND fromuserid IN (618, 17103, 17921, 29550, 31022, 31200, 37237, 43083, 56188, 59939, 61094, 64280, 73683, 87463, 95220)
ORDER BY pmtext.dateline DESC;
MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND fromuserid IN (618, 17103, 17921, 29550, 31022, 31200, 37237, 43083, 56188, ' at line 7
Error Number : 1064
Date : Friday, October 12th 2007 @ 12:19:38 PM
Script : http://forum.computergames.ro/private.php?folderid=0
Referrer : http://forum.computergames.ro/private.php
IP Address : 193.111.120.28
Username : Bossman
Classname : vB_Database_MySQLi
Normal search:
Quote:
Database error in vBulletin 3.6.8:
Invalid SQL:
SELECT pm.*, pmtext.*
, icon.title AS icontitle, icon.iconpath
FROM pm AS pm
LEFT JOIN pmtext AS pmtext ON(pmtext.pmtextid = pm.pmtextid)
LEFT JOIN icon AS icon ON(icon.iconid = pmtext.iconid)
WHERE pm.userid=4877
AND pm.folderid= AND MATCH(pmtext.title, pmtext.message) AGAINST ('+moderator' IN BOOLEAN MODE)
ORDER BY pmtext.dateline DESC;
MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND MATCH(pmtext.title, pmtext.message) AGAINST ('+moderator' IN BOOLEAN MODE)
' at line 7
Error Number : 1064
Date : Friday, October 12th 2007 @ 12:22:57 PM
Script : http://forum.computergames.ro/private.php?folderid=0
Referrer : http://forum.computergames.ro/private.php
IP Address : 193.111.120.28
Username : Bossman
Classname : vB_Database_MySQLi
Any ideas why this is happening?
From what I can tell, there seems to be a problem with the pm.folderid= bit in the query
I have one problem, I am using the show avatars in PM list mod and the search results breaks the rows as show in the screenie. Here is my pmbitlsit template. Any ideas?
Database error in vBulletin 3.6.7:
Invalid SQL:
SELECT pm.*, pmtext.*
, icon.title AS icontitle, icon.iconpath
FROM vb3_pm AS pm
LEFT JOIN vb3_pmtext AS pmtext ON(pmtext.pmtextid = pm.pmtextid)
LEFT JOIN vb3_icon AS icon ON(icon.iconid = pmtext.iconid)
WHERE pm.userid=94
AND pm.folderid=0 AND MATCH(pmtext.title, pmtext.message) AGAINST ('+scuba' IN BOOLEAN MODE)
ORDER BY pmtext.dateline DESC;
MySQL Error : The used table type doesn't support FULLTEXT indexes
Error Number : 1214
Date : Saturday, October 20th 2007 @ 06:02:52 PM
Script : http://forum.xxxxx.com/private.php?folderid=0
Referrer : http://forum.xxxxx.com/private.php
IP Address : 68.xx.xx.xx
Username : nxx
Classname : vB_Database
It took me a while, but I figured out how to get this to work with MySQLi. It will also still work with MySQL, so it probably should be substituted into the plug-in for all users.
Find:
PHP Code:
AND pm.folderid=" . mysql_real_escape_string($_GET['folderid']) . " ";
or, if you've already made the change mentioned in Post #103:
PHP Code:
AND pm.folderid=" . mysql_real_escape_string($search_folderid) . " ";
And replace it with:
PHP Code:
AND pm.folderid=" . $db->escape_string($search_folderid) . " ";