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
  #22  
Old 09-25-2001, 09:28 AM
cyrus's Avatar
cyrus cyrus is offline
 
Join Date: Oct 2001
Posts: 159
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is this similar to TELNET ?? ( which I have but it would be easier to do it through here ! )

Also, how acn I make a DB BACKUP through this ??

thanks
  #23  
Old 09-25-2001, 12:19 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

JJR512, I understand that the code wluke posted does that.
Like he said, it's not fancy or anythin, but works.

Cyrus, no, not really.
This is more like (a very very lite version of) phpMyAdmin, not Telnet.
Although most of the commands you can use in Telnet you can use here (SELECT, UPDATE, INSERT, DELETE, ALTER queries, stuff like that), I'm not sure how you can do a backup from here.
And don't forget there is a backup utility in vBulletin.
  #24  
Old 09-26-2001, 04:20 AM
JJR512's Avatar
JJR512 JJR512 is offline
 
Join Date: Oct 2001
Location: Glen Burnie, MD, USA
Posts: 710
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have had an error with wluke's version. I don't know if there was a thread for that or not, so I don't know where else to put this but here, sorry.

This is the query I attempted to run:
SELECT username FROM user WHERE dct='2' ORDER BY username ASC

This is the error message I received:
Quote:
Database error in vBulletin Control Panel: Invalid SQL: E
mysql error: You have an error in your SQL syntax near 'E' at line 1
mysql error number: 1064
Date: Wednesday 26th of September 2001 01:16:53 AM
Script: /forums/admin/query.php?action=run
Referer: http://216.118.105.52/forums/admin/w-query.php
  #25  
Old 09-26-2001, 08:15 AM
JohnBradshaw's Avatar
JohnBradshaw JohnBradshaw is offline
 
Join Date: Oct 2001
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This has got to be one of the best hacks I have ever seen! Much better then having sort out MyAdmin!
  #26  
Old 09-27-2001, 07:04 PM
YourHostSucks
Guest
 
Posts: n/a
Default

This is very handy and works like a charm (most of the time)

Thanks!
  #27  
Old 11-04-2001, 11:29 AM
TheComputerGuy's Avatar
TheComputerGuy TheComputerGuy is offline
 
Join Date: Oct 2001
Location: TX
Posts: 580
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is just the update for 2.20 Enjoy...Follow all other instructions

In the admin/index.php
Find:
// ***
makenavoption("Add","announcement.php?action=add", "|");
makenavoption("Modify","announcement.php?action=mo dify");
makenavselect("Announcements");
// ***

Above that place this:
makenavoption("Run MySQL","query.php?s=<?php echo $session[sessionhash]; ?>");
makenavselect("MySQL Query");

And save and upload

And upload the Query.php to your admin folder....

Enjoy...
Chris
  #28  
Old 11-04-2001, 05:12 PM
xug xug is offline
 
Join Date: Oct 2001
Location: The Grand Strand, SC
Posts: 339
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very Cool Hack

Thank you FireFly.
  #29  
Old 11-04-2001, 06:05 PM
|DarkManX|'s Avatar
|DarkManX| |DarkManX| is offline
 
Join Date: Oct 2001
Posts: 161
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks GREAT HACK!!
  #30  
Old 11-08-2001, 01:46 AM
SirSteve SirSteve is offline
 
Join Date: Oct 2001
Posts: 382
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works great!
  #31  
Old 03-20-2002, 11:28 AM
Harvey Harvey is offline
 
Join Date: Nov 2001
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

just another query.php, if I may post it.

features:
- run nearly every command MySQL understands
- select the database
- HTML-Tags are shown as HTML-Tags

missing features:
- multiple queries
- no confirmation

known bugs:
- select of DB only works if host/user/pass are the same as for VBB
- warning on statements wich return no result (it still works, but I don't know how to fix)
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 01:41 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.12320 seconds
  • Memory Usage 2,309KB
  • 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
  • (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
  • (4)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
  • (10)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