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

Reply
 
Thread Tools Display Modes
  #1  
Old 08-03-2005, 06:29 AM
dieselpowered's Avatar
dieselpowered dieselpowered is offline
 
Join Date: Aug 2004
Location: Arizona
Posts: 661
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Need More Help Un-Doing Query

Hey everyone, alright, I need to remove this query from my database...what would be the correct command to run??

Quote:
INSERT INTO phrase (languageid,varname,text,phrasetypeid) VALUES ('-1', 'saved_affiliate_x_successfully', '<i>{1}\'s</i> has been updates!', '9000');
INSERT INTO phrase (languageid,varname,text,phrasetypeid) VALUES ('-1', 'deleted_affiliate_x_successfully', '<i>{1}</i> has been deleted!', '9000');
INSERT INTO phrase (languageid,varname,text,phrasetypeid) VALUES ('-1', 'deleted_affiliate_x_unsuccessfully', '<i>{1}</i> was not deleted due to your choice selection.', '9000');
INSERT INTO phrase (languageid,varname,text,phrasetypeid) VALUES ('-1', 'inserted_affiliate_x_successfully', '<i>{1}</i> has been successfully added to the data base.', '9000');
INSERT INTO phrase (languageid,varname,text,phrasetypeid) VALUES ('-1', 'inserted_affiliate_x_unsuccessfully', 'This affiliates could not be added to the database because you either did not enter an affiliate name or an affiliate url or an affiliate email.', '9000');
INSERT INTO phrase (languageid,varname,text,phrasetypeid) VALUES ('-1', 'saved_affiliate_settings_successfully', 'Settings for Affiliates Addon Updated.', '9000');
INSERT INTO phrase (languageid,varname,text,phrasetypeid) VALUES ('-1', 'updated_affiliate_type_successfully', '<i>{1}</i> was updated successfully.', '9000');
INSERT INTO phrase (languageid,varname,text,phrasetypeid) VALUES ('-1', 'updated_affiliate_type_unsuccessfully', 'The type was <u>not</u> updated because the types name was left blank.', '9000');
INSERT INTO phrase (languageid,varname,text,phrasetypeid) VALUES ('-1', 'saved_affiliate_type_unsuccessfully', 'This type/category was not added to the database due to the name of this type/category not being filled in.', '9000');
INSERT INTO phrase (languageid,varname,text,phrasetypeid) VALUES ('-1', 'saved_affiliate_type_successfully', '<i>{1}</i> was added to the database successfully.', '9000');
INSERT INTO phrase (languageid,varname,text,phrasetypeid) VALUES ('0', 'approved_affiliate_x_successfully', '<i>{1}</i> has been approved successfully and an email has been dispatched to its admin\'s email.', '9000');
Thank you!!
Reply With Quote
  #2  
Old 08-03-2005, 06:31 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[sql]DELETE FROM phrase WHERE varname = 'saved_affiliate_x_successfully';[/sql]

Repeat that for each phrase. (changing the name ofcourse).
Reply With Quote
  #3  
Old 08-03-2005, 06:32 AM
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
Posts: 1,551
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by xtremeoff-road
Hey everyone, alright, I need to remove this query from my database...what would be the correct command to run??



Thank you!!
That would be more than one query

Run a query accordingly for each of the above.
[sql]DELETE FROM phrase WHERE varname = 'saved_affiliate_x_successfully' LIMIT 1;[/sql]

Exchange the varname each time
Reply With Quote
  #4  
Old 08-03-2005, 06:39 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Slooooooow Colin

PS That limit is not needed, and could even have undesired side effects.
Reply With Quote
  #5  
Old 08-03-2005, 06:42 AM
dieselpowered's Avatar
dieselpowered dieselpowered is offline
 
Join Date: Aug 2004
Location: Arizona
Posts: 661
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

excellent...thank you guys!!! as always, appreciate the help I am sure I will have more questions, you must forgive my ignorance
Reply With Quote
  #6  
Old 08-03-2005, 06:47 AM
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
Posts: 1,551
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarcoH64
Slooooooow Colin

PS That limit is not needed, and could even have undesired side effects.
Oh bugger off

Why could it have undesired side effects?
Reply With Quote
  #7  
Old 08-03-2005, 06:52 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you have translations into other languages for that phrase, those would not be deleted. Only 1 (and since no ORDER BY is given, this is arbitrary) phrase will get removed.
Reply With Quote
  #8  
Old 08-03-2005, 07:18 AM
dieselpowered's Avatar
dieselpowered dieselpowered is offline
 
Join Date: Aug 2004
Location: Arizona
Posts: 661
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi there...sorry me again...alright I need to undo a bunch of these:

Quote:
$DB_site->query("INSERT INTO ".TABLE_PREFIX."phrase (languageid, varname, text, phrasetypeid) VALUES (0, 'tratings', 'Trader Ratings', 1)");
So how would that look?? Like this:

DELETE FROM phrase WHERE varname = 'tratings', ;Trader Ratings';

Thanks for the help!!
Reply With Quote
  #9  
Old 08-03-2005, 07:22 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just:
[sql]DELETE FROM phrase WHERE varname = 'tratings'[/sql]
Reply With Quote
  #10  
Old 08-03-2005, 07:47 AM
dieselpowered's Avatar
dieselpowered dieselpowered is offline
 
Join Date: Aug 2004
Location: Arizona
Posts: 661
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

LOL I am sorry, what would these be?

Quote:
$DB_site->query("ALTER TABLE ".TABLE_PREFIX."user ADD ratetradetotal SMALLINT(5) DEFAULT '0' NOT NULL");

$DB_site->query("ALTER TABLE ".TABLE_PREFIX."user ADD INDEX ratetradetotal (ratetradetotal)");
I very much appreciate your help!

I was thinking it would be:

ALTER TABLE user DROP ratetradetotal;

ALTER TABLE user DROP INDEX ratetradetotal ;
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 01:23 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.04196 seconds
  • Memory Usage 2,256KB
  • 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
  • (5)bbcode_quote
  • (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