vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Why I have this SQL Error in my forum in newpost_complete (with custom field)? (https://vborg.vbsupport.ru/showthread.php?t=193450)

Jhonnyf 10-12-2008 05:10 PM

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',
        
energiaboss5000,
        
energiainicialboss5000
        WHERE threadid 
'7360';

MySQL Error   Unknown column 'energiaboss' in 'field list'
Error Number  1054
Request Date  
SundayOctober 12th 2008 10:56:52 AM
Error Date    
SundayOctober 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)

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

UPDATE thread 
        SET 
'game' 'user1,user2',
        
'                 energiaboss'5000,
        
'energiainicialboss'5000
        WHERE 
'threadid' '7360' 


It had blanks spaces :'(

I Hate you MySQL!!!!


All times are GMT. The time now is 10:05 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01055 seconds
  • Memory Usage 1,724KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete