Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 11-19-2004, 06:16 AM
lancepoint lancepoint is offline
 
Join Date: Sep 2004
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default php query help

i need to remove threaddesc out of a table vbulletin_thread
This is what i used to add it ...


ALTER TABLE `vbulletin_thread` ADD `threaddesc` VARCHAR( 125 ) NOT NULL;

Now, no posts can be made because of the table has that extra row... Please help me. It should be something simple like remove from or delete from .. please respond with the full query command. Its The newest mysql version on unix based system.

thanks
Reply With Quote
  #2  
Old 11-19-2004, 01:46 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*moved to correct forum*

[sql]ALTER TABLE `vbulletin_thread` DROP `threaddesc`[/sql]

nevertheless vb does not have a problem when there are more fields at the threadtable.
we have more than one field added, and everything works as it should
Reply With Quote
  #3  
Old 11-19-2004, 11:09 PM
lancepoint lancepoint is offline
 
Join Date: Sep 2004
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

THIS IS ERROR I GET>


HTML Code:
Invalid SQL: 
				INSERT INTO vbulletin_thread(title, lastpost, forumid, open, replycount, postusername, postuserid, lastposter, dateline,
					 iconid, visible, attach, similar, threaddesc)
				VALUES
					('THREAD TEST ETEST', 1100856269, 32,
					 1, 0, 'DesignerBeat', 1,
					 'DesignerBeat', 1100856269, 0, 1,
					 0, '', '', 0)
			
mysql error: Column count doesn't match value count at row 1

mysql error number: 1136

thanks
Reply With Quote
  #4  
Old 11-20-2004, 04:10 AM
Logikos Logikos is offline
 
Join Date: Jan 2003
Posts: 2,924
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
Column count doesn't match value count at row 1 
That means the selected feilds in the query don't coun't up to the values. You have 14 feilds to insert into, and there are 15 values there. You either added one to many values into your query, or you missed a feild to insert into.

Here an example query, notice there are 5 feilds to insert into, and the values for all 5 feilds, you can't have 6 feilds and 5 values, or 6 vaules and 5 feilds, it all has to match in the order its being inserted into.

[sql]
$DB_site->query("
INSERT INTO " . TABLE_PREFIX . " TABLE_NAME
(feild_1, feild_2, feild_3, feild_4, feild_5)
VALUES
(value_for_feild_1, value_for_feild_2, value_for_feild_3, value_for_feild_4, value_for_feild_5)
");
[/sql]
Reply With Quote
  #5  
Old 11-20-2004, 04:43 AM
lancepoint lancepoint is offline
 
Join Date: Sep 2004
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can you tell me how i should go about fixing it?
Reply With Quote
  #6  
Old 11-20-2004, 05:55 AM
Logikos Logikos is offline
 
Join Date: Jan 2003
Posts: 2,924
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

what file are you getting the error from?
Reply With Quote
  #7  
Old 11-20-2004, 07:29 AM
lancepoint lancepoint is offline
 
Join Date: Sep 2004
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

newthread.php is the php script
Reply With Quote
  #8  
Old 11-20-2004, 07:30 AM
lancepoint lancepoint is offline
 
Join Date: Sep 2004
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

do you want to have a look at my file?
Reply With Quote
  #9  
Old 11-20-2004, 09:18 AM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Remove the original changes you made to the file or upload a fresh one
Reply With Quote
  #10  
Old 11-21-2004, 08:50 AM
lancepoint lancepoint is offline
 
Join Date: Sep 2004
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

did that still got errors
Reply With Quote
Reply

Thread Tools
Display Modes

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 04:48 PM.


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.04060 seconds
  • Memory Usage 2,234KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_html
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete