Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Dumping Queries Details »»
Dumping Queries
Version: , by sabret00the sabret00the is offline
Developer Last Online: Apr 2010 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 02-18-2003 Last Update: Never Installs: 0
 
No support by the author.

I'm trying to uninstall 2 hacks, but unfortunately they didn't come with an uninstaller, i'm wondering how would i go about dumping the database queries?

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 02-18-2003, 11:46 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ALTER TABLE tablename DROP field

or DROP TABLE tablename
Reply With Quote
  #3  
Old 02-18-2003, 12:30 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok for example heres the first one i'm trying to drop, this is a C+P from the (karma) install file

PHP Code:
    case 2:
        
$query[0] = "DROP TABLE IF EXISTS point";

        
$query[1] = "CREATE TABLE point (newthread int(20) default NULL, reply int(20) default NULL, reply1 int(20) default NULL, reply2 int(20) default NULL, reply3 int(20) default NULL, reply4 int(20) default NULL, reply5 int(20) default NULL, replypoint1 int(20) default NULL, replypoint2 int(20) default NULL, replypoint3 int(20) default NULL, replypoint4 int(20) default NULL, replypoint5 int(20) default NULL, view1 int(20) default NULL, view2 int(20) default NULL, view3 int(20) default NULL, view4 int(20) default NULL, view5 int(20) default NULL, viewpoint1 int(20) default NULL, viewpoint2 int(20) default NULL, viewpoint3 int(20) default NULL, viewpoint4 int(20) default NULL, viewpoint5 int(20) default NULL, addpoint int(20) default NULL, penalty int(20) default NULL, maxpenalty int(20) default NULL, agreepoint int(20) default NULL, dispoint int(20) default NULL, imaword char(1) default NULL, ban char(3) default NULL, expoint int(20) default '0')";

        
$query[2] = "DROP TABLE IF EXISTS storepoint";

        
$query[3] = "CREATE TABLE storepoint (uid int(200) NOT NULL default '0', newthread int(20) default NULL, reply int(20) default NULL, view int(20) default NULL, admin_mod int(20) default NULL, morereply int(20) default NULL, totalpenalty int(20) default NULL, date date default NULL, redeem_points int(20) default NULL)";

        
$query[4] = "DROP TABLE IF EXISTS adis";

        
$query[5] = "CREATE TABLE adis (postid int(20) default NULL, userid int(20) default NULL, username varchar(100) default NULL, post_userid int(20) default NULL, adis char(1) default NULL, comment varchar(255) default NULL)";

        
$query[6] = "DROP TABLE IF EXISTS prize";

        
$query[7] = "CREATE TABLE prize (prizeid varchar(25) NOT NULL default '', title varchar(100) NOT NULL default '', description text, karmapoints smallint(6) NOT NULL default '0', url varchar(150) NOT NULL default '', avatarpath varchar(100) NOT NULL default '', success_url varchar(250) NOT NULL default '', error_url varchar(250) NOT NULL default '', PRIMARY KEY  (prizeid))";

        
$query[8] = "DROP TABLE IF EXISTS prize_exp";

        
$query[9] = "CREATE TABLE prize_exp (exp enum('0','1','2') NOT NULL default '0')";

        
$query[10] = "DROP TABLE IF EXISTS temp_point";

        
$query[11] = "CREATE TABLE temp_point (username varchar(200) NOT NULL default '', point int(100) NOT NULL default '0')";

        
$query[12] = "DROP TABLE IF EXISTS ucode";

        
$query[13] = "CREATE TABLE ucode (prizeid int(100) NOT NULL default '0', userid int(100) NOT NULL default '0', start_date timestamp(14) NOT NULL, redeem_date timestamp(14) NOT NULL, ucode varchar(100) NOT NULL default '', redeem enum('y','n') NOT NULL default 'n')";

        
$message = array(
            
"DROP TABLE point",
            
"CREATE TABLE point",
            
"DROP TABLE storepoint",
            
"CREATE TABLE storepoint",
            
"DROP TABLE adis",
            
"CREATE TABLE adis",
            
"DROP TABLE prize",
            
"CREATE TABLE prize",
            
"DROP TABLE prize_exp",
            
"CREATE TABLE prize_exp",
            
"DROP TABLE temp_point",
            
"CREATE TABLE temp_point",
            
"DROP TABLE ucode",
            
"CREATE TABLE ucode"
            
);
    
        
head("Creating tables...");
        print 
"<br>";
        if (
$action=='setsql') {
            
mysql_connect($servername$dbusername$dbpassword);
            
mysql_select_db($dbname);
            
$failed 0;
            for (
$i=0$i<14$i++) {
                
$result mysql_query($query[$i]);
                if (
$result) {
                    print 
"<table border=0 width=30% align=center>";
                    print 
"<tr><td><font face=verdana size=2>$message[$i] successful.</font></td></tr>";
                    print 
"</table>";
                    
                    }
                else {
                    print 
"<p align=center>$message[$i] not successful.</p><br>";
                    print 
"mysql_error($result)<br>";
                    
$failed 1;
                    }
                }
            echo 
"</p>";
            if (!
$failed) {
                print 
"<form action=$script method=post>\n";
                print 
"<p align=center>\n";
                print 
"<input type=submit value='Next' style='font-family: Verdana; font-weight: bold;'>\n";
                print 
"<input type=hidden name=page value=3>\n";
                print 
"<input type=hidden name=action value=modify>\n";
                print 
"</p>\n";
                print 
"</form>\n";
                }
            }
        
foot();
        break; 

and the second is here (from mood5 hack)

PHP Code:
// ******************* STEP 2 *******************
if ($step==2) {

    echo 
"Editing the <i>user</i> table ... ";
    
$DB_site->query("ALTER TABLE user ADD mood varchar(25) NOT NULL");
      echo(
"<br><b>mood field added!<p><br>\n");
      
$DB_site->query("ALTER TABLE user ADD reason varchar(25) NOT NULL");
      echo(
"<br><b>reason field added!<p><br>\n");
      
$DB_site->query("ALTER TABLE user ADD drate varchar(10) NOT NULL");
      echo(
"<br><b>drate field added!<p><br>\n");
    
$DB_site->query("ALTER TABLE user ADD off varchar(25) NOT NULL");
      echo(
"<br><b>off field added!<p><br>\n");
    
$DB_site->query("ALTER TABLE user ADD time varchar(18) NOT NULL");
      echo(
"<br><b>time field added!<p><br>\n");
    
$DB_site->query("ALTER TABLE user ADD today varchar(18) NOT NULL");
      echo(
"<br><b>today field added!<p><br>\n");
    
$DB_site->query("ALTER TABLE user ADD comments varchar(250) NOT NULL");
      echo(
"<br><b>comments field added!<p><br>\n");
      echo(
"<br><b>Database Manipulation Complete!<p><br>\n");
      echo(
"<br><b>Move on to the next part!<p><br>\n");

  
gotonext();

how would i go about removing these two?
Reply With Quote
  #4  
Old 02-18-2003, 12:51 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the first is very easy, because the queries are already named:
PHP Code:
        $query[0] = "DROP TABLE IF EXISTS point";
        
$query[2] = "DROP TABLE IF EXISTS storepoint";

        
$query[4] = "DROP TABLE IF EXISTS adis";


        
$query[6] = "DROP TABLE IF EXISTS prize";

        
$query[8] = "DROP TABLE IF EXISTS prize_exp";

        
$query[10] = "DROP TABLE IF EXISTS temp_point";


        
$query[12] = "DROP TABLE IF EXISTS ucode"

And seconds:
[sql] ALTER TABLE user DROP today,comments,time,off,drate,reason,mood[/sql]
Reply With Quote
  #5  
Old 02-18-2003, 01:07 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok so the second one i'd do in the phpmyadmin but what about the first should i make a php file or something 0_o
Reply With Quote
  #6  
Old 02-18-2003, 01:19 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

just run the queries within the strings....
Reply With Quote
  #7  
Old 02-18-2003, 02:43 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks alot you just helped me out loads
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 11:55 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.04163 seconds
  • Memory Usage 2,305KB
  • Queries Executed 20 (?)
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
  • (3)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (6)postbit
  • (7)postbit_onlinestatus
  • (7)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete