Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-12-2008, 04:10 PM
Jhonnyf's Avatar
Jhonnyf Jhonnyf is offline
 
Join Date: Nov 2007
Location: In my mind
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Why I have this SQL Error in my forum in newpost_complete (with custom field)?

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:

PHP Code:
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:

PHP 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 [DATE]1223836328[/DATE] at [TIME]1223836328[/TIME] ---------------

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)
Reply With Quote
  #2  
Old 10-13-2008, 07:20 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If the columns do exist in the thread table of the database your board is connecting to, you should not have this error.
Reply With Quote
  #3  
Old 10-13-2008, 10:40 AM
Jhonnyf's Avatar
Jhonnyf Jhonnyf is offline
 
Join Date: Nov 2007
Location: In my mind
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
PHP Code:
UPDATE thread 
        SET 'game' = 'user1,user2',
        '                 energiaboss'= 5000,
        'energiainicialboss'= 5000
        WHERE 'threadid' = '7360' 

It had blanks spaces :'(

I Hate you MySQL!!!!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:47 PM.


Powered by vBulletin® Version 3.9.0
Copyright ©2000 - 2017, vBulletin Solutions Inc.