Quote:
Originally Posted by Marco van Herwaarden
'$sbc_ban_message'
Variables do not work inside single-quotes. 
|
He has it in double quotes

the single-quotes are for MySQL.
Dump the $sbv_ban_message just before the query and exit the script before the query is run, then you can see weather it is the query or the actual variable that is wrong.
I think you should use the INSERT INTO `table` (`cols`) VALUES ('values') so that you can ensure the values are being set in the right column, it maybe you have mixed up the order and the message isn't being inserted into the right column and so it appears as though it hasn't been entered.
(Like dismounted said if you are using the vBulletin backend use the vB database class here is an article about using it:
https://vborg.vbsupport.ru/showthread.php?t=119350)