View Full Version : warn member error
xtreme-mobile
02-05-2005, 03:30 PM
hi guys
have installed the hack but when i click warn member and click what warnig i want to give i get the following error
Database error in vBulletin 3.0.6:
Invalid SQL: update user set warning_level='3', warnings='1' where userid='166'
mysql error: Unknown column 'warnings' in 'field list'
mysql error number: 1054
Date: Saturday 05th of February 2005 10:25:27 AM
Script: http://www.extreme-mobile.com/forums/Warn.php
Referer: http://www.extreme-mobile.com/forums/Warn.php?do=WarnUser&id=166&post=1319
Username: admin
any ideas whats wrong?
many thanks
dean
can anyone help with this?
sv1cec
02-06-2005, 06:27 PM
Yes, it is obvious that the warnings column does not exist in your table. Add it by running the following query:
ALTER TABLE `user` ADD COLUMN `warnings` int(5)
Rgds
xtreme-mobile
02-07-2005, 06:12 AM
thanks for your reply mate, i added the query but now get a differnt error:
Database error in vBulletin 3.0.6:
Invalid SQL:
UPDATE user SET
usergroupid = 28,
displaygroupid = 28,
warnings=2,
warning_level=11,
warning_bans = ,
usertitle = 'Temporarily Banned'
WHERE userid = 166
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 '
usertitle = 'Temporarily Banned'
WHERE userid = 166' a
mysql error number: 1064
Date: Monday 07th of February 2005 01:10:51 AM
Script: http://www.extreme-mobile.com/forums/Warn.php
Referer: http://www.extreme-mobile.com/forums/Warn.php?do=WarnUser&id=166&post=1319
Username: admin
IP Address: xxx.xxx.xxx.xx
sv1cec
02-07-2005, 10:41 AM
thanks for your reply mate, i added the query but now get a differnt error:
Database error in vBulletin 3.0.6:
Invalid SQL:
UPDATE user SET
usergroupid = 28,
displaygroupid = 28,
warnings=2,
warning_level=11,
warning_bans = ,
usertitle = 'Temporarily Banned'
WHERE userid = 166
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 '
usertitle = 'Temporarily Banned'
WHERE userid = 166' a
mysql error number: 1064
Date: Monday 07th of February 2005 01:10:51 AM
Script: http://www.extreme-mobile.com/forums/Warn.php
Referer: http://www.extreme-mobile.com/forums/Warn.php?do=WarnUser&id=166&post=1319
Username: admin
IP Address: xxx.xxx.xxx.xx
Which version of AWS are you running? There doesn't seem to be any error with the SQL statement, except that 'a' , at WHERE userid = 166' a
But I am not sure if that's from the error message or it got there when copying and pasting.
Also, does that happen every time you issue a warning to a user, or only when that user reaches the ban limit?
rgds
xtreme-mobile
02-07-2005, 04:50 PM
ok im using 3.15 i think
it seems to be working ok, BUT when they go over the maximum warn points (10 in my forums case)
it then shows this error
Database error in vBulletin 3.0.6:
Invalid SQL:
UPDATE user SET
usergroupid = 28,
displaygroupid = 28,
warnings=5,
warning_level=12,
warning_bans = ,
usertitle = 'Temporarily Banned'
WHERE userid = 166
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 '
usertitle = 'Temporarily Banned'
WHERE userid = 166' a
mysql error number: 1064
Date: Monday 07th of February 2005 11:48:09 AM
Script: http://www.extreme-mobile.com/forums/Warn.php
Referer: http://www.extreme-mobile.com/forums/Warn.php?do=WarnUser&id=166&post=1319
Username: admin
IP Address: xx.xxx.xx.x
so basically when they have reached the banned limit the error occurs
any ideas?
regards
dean
sv1cec
02-08-2005, 05:16 AM
ok im using 3.15 i think
it seems to be working ok, BUT when they go over the maximum warn points (10 in my forums case)
it then shows this error
Database error in vBulletin 3.0.6:
Invalid SQL:
UPDATE user SET
usergroupid = 28,
displaygroupid = 28,
warnings=5,
warning_level=12,
warning_bans = ,
usertitle = 'Temporarily Banned'
WHERE userid = 166
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 '
usertitle = 'Temporarily Banned'
WHERE userid = 166' a
mysql error number: 1064
Date: Monday 07th of February 2005 11:48:09 AM
Script: http://www.extreme-mobile.com/forums/Warn.php
Referer: http://www.extreme-mobile.com/forums/Warn.php?do=WarnUser&id=166&post=1319
Username: admin
IP Address: xx.xxx.xx.x
so basically when they have reached the banned limit the error occurs
any ideas?
regards
dean
Please try to upload the file includes/funtions_warning.php to your web server. Download the zip file from the initial thread and extract the above file. Then upload it to your web server. It looks as if the syntax of that file is wrong, near line 304. If you can send me some of the lines of that file, say from line 290 up to 320, I can check it out, but I am sure that the latest one is working fine, haven't touched that file for a while.
Rgds
Revan
02-08-2005, 05:53 AM
The error is the fact that it tries to update the warning_bans with an empty string.
This would solve itself if sv1 would just wrap ' around all variables parsing to SQL.
(Then again, this way of halting SQL errors makes detecting errors harder, but meh)
sv1cec
02-08-2005, 04:30 PM
The error is the fact that it tries to update the warning_bans with an empty string.
This would solve itself if sv1 would just wrap ' around all variables parsing to SQL.
(Then again, this way of halting SQL errors makes detecting errors harder, but meh)
Revan,
I do not think so. it doesn't act like that on my site, for some reason. If you check the code, warning_bans should have a value, either 1 or previous value+1. So I do not think that's the problem.
We will only know when we'll see the code.
Rgds
xtreme-mobile
02-08-2005, 06:51 PM
right guys ive downloaded the latest files and replaced the "functions_warnings" file on my account and i get the following error when i put the user up to the ban limit
Database error in vBulletin 3.0.6:
Invalid SQL:
UPDATE user SET
usergroupid = 28,
displaygroupid = 28,
warnings=7,
warning_bans = 1,
usertitle = 'Temporarily Banned'
WHERE userid = 166
mysql error: Unknown column 'warning_bans' in 'field list'
mysql error number: 1054
Date: Tuesday 08th of February 2005 01:48:57 PM
Script: http://www.extreme-mobile.com/forums/Warn.php
Referer: http://www.extreme-mobile.com/forums/Warn.php?do=WarnUser&id=166&post=1319
Username: admin
IP Address: xxx.xxx.xxx.xx
any ideas? also i dont understand what code you wnat me to show you? sorry mate am quite an amature at this
sv1cec
02-09-2005, 06:50 AM
right guys ive downloaded the latest files and replaced the "functions_warnings" file on my account and i get the following error when i put the user up to the ban limit
Database error in vBulletin 3.0.6:
Invalid SQL:
UPDATE user SET
usergroupid = 28,
displaygroupid = 28,
warnings=7,
warning_bans = 1,
usertitle = 'Temporarily Banned'
WHERE userid = 166
mysql error: Unknown column 'warning_bans' in 'field list'
mysql error number: 1054
Date: Tuesday 08th of February 2005 01:48:57 PM
Script: http://www.extreme-mobile.com/forums/Warn.php
Referer: http://www.extreme-mobile.com/forums/Warn.php?do=WarnUser&id=166&post=1319
Username: admin
IP Address: xxx.xxx.xxx.xx
any ideas? also i dont understand what code you wnat me to show you? sorry mate am quite an amature at this
I guess you had installed a previous version first and now you are upgrading. That's why you do not have the warning_bans column. Try running this query:
ALTER TABLE user ADD COLUMN warning_bans int(2)
Remember to add any table prefix if you are using one. Let me know if that works.
rgds
xtreme-mobile
02-09-2005, 04:45 PM
guess you had installed a previous version first and now you are upgrading. That's why you do not have the warning_bans column. Try running this query:
its a fresh installation mate
ive recently upgraded my forum to 3.06 and it wiped my board so im basically starting again, so didnt have any warning hacks installed
ill try and run this query now and see if anything happens and ill report here
cheers
dean
UPDATE
ok have just tried to run the query and it said this error when running:
MySQL said:
#1060 - Duplicate column name 'warning_bans'
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/common.lib.php on line 682
any other ideas?
sv1cec
02-09-2005, 06:23 PM
its a fresh installation mate
ive recently upgraded my forum to 3.06 and it wiped my board so im basically starting again, so didnt have any warning hacks installed
ill try and run this query now and see if anything happens and ill report here
cheers
dean
UPDATE
ok have just tried to run the query and it said this error when running:
MySQL said:
#1060 - Duplicate column name 'warning_bans'
Warning: mysql_result(): supplied argument is not a valid MySQL result resource in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/common.lib.php on line 682
any other ideas?
These are contradictory things. I mean in the first error message, it says that the column warning_bans is unknown (i.e. does not exist) and in the second, when you try to add it, it says that it exists.
I am not sure what to tell you. Are you sure you are using the same database, the same table names (any table prefix?)? I do not know.
xtreme-mobile
02-09-2005, 09:00 PM
yeh am using the same data base, i dont know whts up with it, each step was followed and it works fine exept for the fact it dont work when they reach the warn limit :(
sv1cec
02-11-2005, 09:41 AM
yeh am using the same data base, i dont know whts up with it, each step was followed and it works fine exept for the fact it dont work when they reach the warn limit :(
Do me a favor, run the following query:
describe users
Also, run the followings :
describe warning_options
and
describe warnings
Let's try to figure this out.
Rgds
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.