PDA

View Full Version : Why I have this SQL Error in my forum in newpost_complete (with custom field)?


Jhonnyf
10-12-2008, 05:10 PM
I'm making a hack for my forum... when I use this modifycation in one forum (new and clean) I not have error... but when I put this in another forum.. this show me:

Database error in vBulletin 3.7.3:

Invalid SQL:
UPDATE thread
SET game = 'user1,user2',
energiaboss= 5000,
energiainicialboss= 5000
WHERE threadid = '7360';

MySQL Error : Unknown column 'energiaboss' in 'field list'
Error Number : 1054
Request Date : Sunday, October 12th 2008 @ 10:56:52 AM
Error Date : Sunday, October 12th 2008 @ 10:56:53 AM
Script : http://www.xxxxxxxxxxxxx.com/newthread.php?do=postthread&f=38
Referrer : http://www.xxxxxxxxxxxxxxx.com/newthread.php?do=newthread&f=38
IP Address : xxxxxxxx
Username : xxxxxxxxxxx
Classname : vB_Database
MySQL Version : 5.0.67-log

I use a plugin hook in "newpost_complete" the is code:

if ($type == 'thread')
{
//make SQL UPDATE
}

the field "energiaboss" exist in my table (I created using phpMyAdmin)

I disable all my hacks using newpost_complete, and i don't know hy say me "in 'field list'" or maybe I should be add this column using my hack like a product??

Thank you

--------------- Added 1223836328 at 1223836328 ---------------

The same error using the sql sentence in vBulletin SQL QUERY console and using in phpMyAdmin console..... but, when I modify using phpMyAdmin I not have that error and show me the same SQL Sentence


why?? problem update all my records with the new field???

PD: the field exist in my table.... i think that is problem of the MySQL of that hosting (goddady)

Marco van Herwaarden
10-13-2008, 08:20 AM
If the columns do exist in the thread table of the database your board is connecting to, you should not have this error.

Jhonnyf
10-13-2008, 11:40 AM
I hate you MySQL!!!!!!!

when i use SQL (vbulletin or SQL Console en phpMyAdmin) the fields its show
threadid|etc|etc|energiaboss|etc

but when I create a new register (phpMyAdmin) the SQL QUERY that show me was:
UPDATE thread
SET 'game' = 'user1,user2',
' energiaboss'= 5000,
'energiainicialboss'= 5000
WHERE 'threadid' = '7360'


It had blanks spaces :'(

I Hate you MySQL!!!!