Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Closed Thread
 
Thread Tools
Details »»

Version: , by Admin (Coder) Admin is offline
Developer Last Online: Nov 2024 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 08-23-2001 Last Update: Never Installs: 56
 
No support by the author.

Description:
I see a lot of people here who are trying to fix a problem or install a hack, sometimes requires them to run a SQL query on their database, and just don't know quite how.
I know you can use Telnet, but not everyone has access, and I know there's phpMyAdmin, but who needs all that when you just need to update a table or add a field.
Of course running select queries with this is not very useful, but I'm working on changing that.


Main Features:
- Run a single query
- Run multiple queries
- Option to show / not show query after execution
- Confirmation page


Demo:
1.

2.

3.

4.



Installation:
1. Unzip query.php from the attached zip file and upload to your admin folder.

2. In index.php (under your admin folder), replace
PHP Code:
<tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="2" id="navtable">
<?php maketableheader("Options"); ?>
</table>
<a href="options.php?s=<?php echo $session[sessionhash]; ?>&action=options"> Change options </a>
</td></tr>
with
PHP Code:
<tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="2" id="navtable">
<?php maketableheader("Options"); ?>
</table>
<a href="options.php?s=<?php echo $session[sessionhash]; ?>&action=options"> Change options </a>
</td></tr>

<tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="2" id="navtable">
<?php maketableheader("SQL Queries"); ?>
</table>
<a href="query.php?s=<?php echo $session[sessionhash]; ?>"> Run a SQL query </a>
</td></tr>

That's it - can it get any more simple?
Feedback, requests, future ideas and anything else is more than welcome.

Show Your Support

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

Comments
  #12  
Old 08-24-2001, 09:19 PM
Wayne Luke's Avatar
Wayne Luke Wayne Luke is offline
Senior Member
 
Join Date: Jan 2002
Location: Southern California
Posts: 1,694
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This isn't as fancy but it can run every query MySQL can process. It gives columnized results and it works on all versions of vBulletin. This is probably my first hack ever for vBulletin and I have been using it successfully for the last year.

Just rename it query.php and put a link for it in index.php.
  #13  
Old 08-25-2001, 06:26 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So you're saying I wasted a day of my life?
Thanks Wayne.
  #14  
Old 08-25-2001, 07:18 AM
orca's Avatar
orca orca is offline
 
Join Date: Oct 2001
Location: Switzerland
Posts: 183
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by FireFly
Orca, I'll see what I can do.
(btw, are you a female or a male? I've been wondering for days now )
Just checked: Still all male.
  #15  
Old 08-25-2001, 10:50 AM
Pie'oh'pah
Guest
 
Posts: n/a
Default

Thumbs up dude

This is some serious hack! Small, easy to do and running fine!

Thnx

-Alex
  #16  
Old 08-25-2001, 03:51 PM
webhost's Avatar
webhost webhost is offline
 
Join Date: Oct 2001
Location: St. Louis
Posts: 577
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks For the hack Firefly, This will make things alot easier.
  #17  
Old 09-24-2001, 03:26 AM
Fred
Guest
 
Posts: n/a
Default

Got a weird error. I did what you said, then when I clicked on the link on the side to add a query. It went to the page, and above it all had this:
Code:
Fatal error: Call to undefined function: getrowbg() in /usr/accountname/forum/admin/query.php on line 66
  #18  
Old 09-24-2001, 04:58 AM
[VbbFr]Elie
Guest
 
Posts: n/a
Default

It's looking to work but what horible look (wluke file)
One small problem ... If there is HTML in table, there is not keep caracter and translate in HTML in the page ...

Sorry about my bad english
  #19  
Old 09-24-2001, 05:34 PM
GetMeHosted.com
Guest
 
Posts: n/a
Default

Simple, and a all around Great Feature!

Thanks...

God Bless,
  #20  
Old 09-24-2001, 10:03 PM
Mike Gaidin's Avatar
Mike Gaidin Mike Gaidin is offline
 
Join Date: Oct 2001
Location: Michigan
Posts: 247
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack FireFly!!!!

I love this one. Good job!
  #21  
Old 09-24-2001, 10:20 PM
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Location: Glen Burnie, MD, USA
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a good idea, but it definitely needs some way to view the output. For example, I'd like to be able to run this query and see the list it gives me:
SELECT username FROM user WHERE dct='X' ORDER BY username ASC
(Which involves a custom field in my user table.)
Closed Thread


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 02:02 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.04600 seconds
  • Memory Usage 2,300KB
  • Queries Executed 25 (?)
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)bbcode_code
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (7)postbit_onlinestatus
  • (11)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