vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   [RELEASE v2] Run a SQL query directly from your admin contorl panel (https://vborg.vbsupport.ru/showthread.php?t=26272)

Admin 08-23-2001 10:00 PM

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.
http://forum.t-cove.com/query1.gif
2.
http://forum.t-cove.com/query2.gif
3.
http://forum.t-cove.com/query3.gif
4.
http://forum.t-cove.com/query4.gif


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. :D

joecrow 08-24-2001 08:08 AM

kool thanks for the hack m8 keep up the good work.

Bane 08-24-2001 08:08 AM

Great Idea FireFly! Off to install this one :) Great thinking.

orca 08-24-2001 09:20 AM

Agree with Bane

/me is off installing...

orca 08-24-2001 09:32 AM

Worked like a charm. But I have a suggestion:

If I want to run a query which gives a result, e.g. the example query from mySQL
Code:

select BENCHMARK(1000000,encode("hello","goodbye"));
it should display the result. Now it only repeats the query again since I set this option to yes.

Admin 08-24-2001 10:34 AM

Thanks all for the comments.

[QUOTE]Originally posted by FireFly
Of course running select queries with this is not very useful, but I'm working on changing that.

Thomas P 08-24-2001 02:15 PM

As far as I know he's male (right?)
Great hack btw :D
-Tom

eva2000 08-24-2001 02:15 PM

interesting hack.. :)

butty 08-24-2001 02:51 PM

great hack, so easy 2 install even me gran could have installed it!! :)

Admin 08-24-2001 08:16 PM

I've been working on this alot today.
I wanna go to sleep, and I don't have time to create new screen shots, edit posts and such, so I'm just going to post this new file here and when I wake up I'll sort everything.

This has support for basic queries, such as
Code:

SELECT ... FROM ... WHERE
Basically almost everything, except for AS. Don't try using AS, it will not work.

To install this simply upload the new file and overwrite the old one.

A basic screen shot is available in the zip file. *yawn*

Please post any feedback and suggestions about this, so I could fix / add anything to the new re-release! Thanks! :)


All times are GMT. The time now is 12:34 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.01054 seconds
  • Memory Usage 1,738KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete