View Full Version : i need your help database error
aim4fun
10-20-2007, 01:26 AM
my site gives me this database error
Database error in vBulletin 3.6.5:
Invalid SQL:
SELECT * FROM user AS user
LEFT JOIN usergroup AS usergroup ON (user.usergroupid = usergroup.usergroupid)
WHERE user.username = 'Dr Mo'men';
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 'men'' at line 3
Error Number : 1064
Date : Friday, October 19th 2007 @ 07:14:15 PM
Script : http://aim4fun.com/vb/index.php
Referrer :
IP Address : 41.235.132.127
Username : dr-killer
Classname : vb_database
any one can solve this problem ?
--------------- Added 1192850934 at 1192850934 ---------------
some one help
MoT3rror
10-20-2007, 02:35 AM
SELECT * FROM user AS user
LEFT JOIN usergroup AS usergroup ON (user.usergroupid = usergroup.usergroupid)
WHERE user.username = 'Dr Mo\'men';
That should make it work.
aim4fun
10-20-2007, 02:37 AM
and how can i change it
????
this is an error massage
MoT3rror
10-20-2007, 02:43 AM
In your where statement you have this.
WHERE user.username = 'Dr Mo'men';
The value Dr Mo'men was entered. The quote(') would stop the value at Dr Mo. You have to escape the quote(') with a slash(\) so it doesn't stop the query at the quote.
aim4fun
10-20-2007, 02:56 AM
i know but how may i change it
take look into my website
aim4fun.com/vb
i mean what should i do in order to fix this problem?
MoT3rror
10-20-2007, 03:00 AM
Do you have any mods installed?
Did you edit the vBulletin code?
aim4fun
10-20-2007, 03:07 AM
Do you have any mods installed?
i don`t think so
Did you edit the vBulletin code?
not at all
--------------- Added 1192853300 at 1192853300 ---------------
i can`t even loginto my cpanel
--------------- Added 1192853519 at 1192853519 ---------------
there is an addon " name of members for the last 24 hr "
and the member mo`men is one of them
but i placed this addon long time ago and nothing happen
MoT3rror
10-20-2007, 03:12 AM
Sounds like a server problem if you can't sign into Cpanel. Also after you can sign in again, I reupload all of the files for vBulletin overwriting the ones on the server. Make sure you are uploading the files for your version of vBulletin that you are currently running.
Probably would be best to contact your hosting company.
aim4fun
10-20-2007, 03:22 AM
nothing wrong with the server
using the query
WHERE user.username = 'Dr Mo'men';
at the database gives you the error
but in case i use
WHERE user.username = 'Dr Mo/'men';
this query is comletely right
but how may i force the script to use it
or how may i change it
i don`t know thats the problem
MoT3rror
10-20-2007, 03:42 AM
Try downloading the files from vBulletin.com and reuploading all your vBulletin files. If that doesn't work post the bug here (http://www.vbulletin.com/forum/project.php?do=issuelist&projectid=6&issuetypeid=bug&appliesversionid=g7).
Marco van Herwaarden
10-20-2007, 03:49 AM
I strongly suggest you remove that modification from your board, as it is vulnerable to SQL-injections.
If you still know which modification you are using, then please send me a PM with the link to the modification thread.
aim4fun
10-20-2007, 03:55 AM
sorry am not sure which modification caused that error
i didn`t modify anything for the last week
can some one write to me query code
so i can replase the name " mo`men " into " momen "
at my database
Marco van Herwaarden
10-20-2007, 05:56 AM
Most likely the modification you mentioned. I strongly suggest to remove that modification, as only changing 1 username does not protect your board.
aim4fun
10-20-2007, 10:08 PM
i think this modification caused the error
https://vborg.vbsupport.ru/showthread.php?t=149167&page=9
but how may i remove it
i can`t log into my cpanel
it refuse to sign in because of data base error
please help me
Marco van Herwaarden
10-21-2007, 04:28 AM
To troubleshoot this, please remove any hacks and disable your plugins, then see if you still have this problem.
Note: To temporarily disable the plugin system, edit config.php and add this line right under <?php
define('DISABLE_HOOKS', true);
aim4fun
10-21-2007, 10:02 PM
thanks alot
i just solve the problem
by deleting the last thumb from data base
i didn`t know about the disabling of plugin system
but for sure it would solve such error
this errer caused by bug within the hack "last X threads "
due to present of " ' " at name of one of my members
to avoid this i just block any farther registration names with " ' " sign
thanks for help
wish you good luck
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.