Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 06-06-2003, 11:46 PM
superman superman is offline
 
Join Date: Jun 2002
Location: 559 are code for Cali
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How to delete a sql entry

Well, the main problem is, it didn't creat tables, just modified original ones, here is the sql entry, can someone give me an sql entry to delete the entry?.
Heres the entry below. forum being the name of your forum db

ALTER TABLE `forum`.`user` ADD `hp` INT(6) DEFAULT '0' NOT NULL, ADD `maxhp` INT(6) DEFAULT '0' NOT NULL, ADD `ma` INT(6) DEFAULT '0' NOT NULL, ADD `maxma` INT(6) DEFAULT '0' NOT NULL, ADD `pp` INT(6) DEFAULT '0' NOT NULL, ADD `maxpp` INT(6) DEFAULT '0' NOT NULL, ADD `ap` INT(6) DEFAULT '0' NOT NULL, ADD `element` INT(3) DEFAULT '0' NOT NULL;
Reply With Quote
  #2  
Old 06-07-2003, 12:16 AM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[sql]
ALTER TABLE forum DROP hp;
ALTER TABLE user DROP hp;
[/sql]
edit: ...repeat the pattern...because the query's one line it's half impossible to read
Reply With Quote
  #3  
Old 06-07-2003, 03:23 AM
superman superman is offline
 
Join Date: Jun 2002
Location: 559 are code for Cali
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ahh here we go, can you do it now? I have no clue about ANYTHING in sql, so can you like.. redo it so I can just copy and paste what you write? THANKS in advance. The hack I trid to implement wasn't worth it.


[SQL]ALTER TABLE `forum`.`user` ADD `hp` INT(6) DEFAULT '0' NOT NULL, ADD `maxhp` INT(6) DEFAULT '0' NOT NULL, ADD `ma` INT(6) DEFAULT '0' NOT NULL, ADD `maxma` INT(6) DEFAULT '0' NOT NULL, ADD `pp` INT(6) DEFAULT '0' NOT NULL, ADD `maxpp` INT(6) DEFAULT '0' NOT NULL, ADD `ap` INT(6) DEFAULT '0' NOT NULL, ADD `element` INT(3) DEFAULT '0' NOT NULL;[/SQL]
Reply With Quote
  #4  
Old 06-07-2003, 08:39 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[sql]ALTER TABLE forum.user DROP hp[/sql]
Reply With Quote
  #5  
Old 06-07-2003, 05:23 PM
superman superman is offline
 
Join Date: Jun 2002
Location: 559 are code for Cali
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well I took your guys advice, and tried writing an sql query with what you gave me, this is what I came up with, I didn't know if you shoudl put the ``` things in so I did, please let me know if this would work or not.

[SQL]ALTER TABLE `forum`.`user DROP `hp` INT(6) DEFAULT '0' NOT NULL, DROP `maxhp` INT(6) DEFAULT '0' NOT NULL, ADD `ma` INT(6) DEFAULT '0' NOT NULL, DROP `ma` INT(6) DEFAULT '0' NOT NULL, DROP `maxma` INT(6) DEFAULT '0' NOT NULL, DROP `pp` INT(6) DEFAULT '0' NOT NULL, DROP `maxpp` INT(6) DEFAULT '0' NOT NULL, DROP `ap` INT(6) DEFAULT '0' NOT NULL, DROP `element` INT(3) DEFAULT '0' NOT NULL; [/SQL]

EDIT: this didn't work can someone give me a clear thing of what to do?
Reply With Quote
  #6  
Old 06-07-2003, 09:46 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i told ya the exact query, nothing has to be added

repeat this queriy for every added field like maxhp....
Reply With Quote
  #7  
Old 06-07-2003, 09:47 PM
superman superman is offline
 
Join Date: Jun 2002
Location: 559 are code for Cali
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oh! lol thanks
Reply With Quote
  #8  
Old 06-07-2003, 10:58 PM
superman superman is offline
 
Join Date: Jun 2002
Location: 559 are code for Cali
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks a bunch, worked fine, and got rid of all of em.

thanks again
Reply With Quote
  #9  
Old 06-08-2003, 09:25 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you're welcome
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 08:47 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03844 seconds
  • Memory Usage 2,229KB
  • Queries Executed 13 (?)
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)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)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_postinfo_query
  • fetch_postinfo
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete