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)
-   -   SQL Query from Control Panel (https://vborg.vbsupport.ru/showthread.php?t=33731)

JamesUS 01-01-2002 10:00 PM

This hack allows you to execute custom SQL queries from the control panel.

I know there are one or two other hacks that do this but this one is different in that it can also cope with 'SELECT' queries. Results are displayed in a table for select queries. Inspired by wluke's older version of this hack for vB 1.1.x, I have been using this succesfully for a few days now on my own forums.

Instructions[list type=1][*]Upload attached 'query.php' file to the admin folder.[*]In admin/index.php, find:
PHP Code:

makenavselect("Options","<hr>"); 

underneath, add:
PHP Code:

makenavoption("Run Query""query.php?t=0");
makenavselect("Database Maintanence""<br>"); 

[/list]This hack copyright James Ussher-Smith &copy; 2001 - 2002

Dalius 01-02-2002 04:13 PM

This is VERY useful, thanks!

Dalius 01-02-2002 04:42 PM

I did exactly what it sais but....

whats with the gap?

Lesane 01-02-2002 04:52 PM

GREAT hack, thanks.

FWC 01-02-2002 05:22 PM

Quote:

Originally posted by Dalius
I did exactly what it sais but....

whats with the gap?

Remove the <br> after Database Maintenance if you want that gap to go away.

FWC 01-02-2002 05:24 PM

Quote:

Originally posted by JamesUS
Inspired by wluke's older version of this hack for vB 1.1.x, I have been using this succesfully for a few days now on my own forums.
Very nice, James! I've been using Wayne's hack for months. This version looks much more vB like. :)

Dalius 01-02-2002 06:18 PM

Quote:

Originally posted by FWC
Remove the <br> after Database Maintenance if you want that gap to go away.
thanks

DelusionalMind 01-06-2002 10:57 PM

very nice :)

no more firing up phpmyadmin :)

Stretchr 01-16-2002 03:19 PM

Nice job but unless I'm missing something, Chen already wrote and posted a similar hack to this with a little more functionality:
https://vborg.vbsupport.ru/showthrea...threadid=26272

Ph0eniX 08-21-2002 01:53 AM

I'm getting this when I click on "Run Query":

"CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:"

...any ideas?

ExAvIoUr 09-02-2002 12:01 AM

Thank you, I really need this!

410 09-10-2002 03:38 PM

I get this error...

Warning: mysql_num_fields(): supplied argument is not a valid MySQL result resource in /home/public_html/forums/admin/query.php on line 27
Query Result - ALTER TABLE post ADD COLUMN nuked smallint(6) not null;

Warning: mysql_num_fields(): supplied argument is not a valid MySQL result resource in /home/public_html/forums/admin/query.php on line 29

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/public_html/forums/admin/query.php on line 33

Brahm 01-09-2003 02:29 PM

Great hack JamesUS

S1R1US 02-13-2003 01:42 AM

will this work with 2.2.9?

animi12 03-25-2003 06:54 PM

Quote:

02-12-03 at 09:42 PM S1R1US said this in Post #14
will this work with 2.2.9?
I'd also like to know if this is compatible with 2.2.9. Thanks!

user360 03-26-2003 01:23 AM

cool hack.

im getting the error

Quote:

Warning: mysql_num_fields(): supplied argument is not a valid MySQL result resource in /home/virtual/site34/fst/var/www/html/iforum/admin/query.php on line 27
Query Result - ALTER TABLE bbcode CHANGE bbcodereplacement bbcodereplacement TEXT;

Warning: mysql_num_fields(): supplied argument is not a valid MySQL result resource in /home/virtual/site34/fst/var/www/html/iforum/admin/query.php on line 29

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/virtual/site34/fst/var/www/html/iforum/admin/query.php on line 33
im using 2.2.9

user360 03-27-2003 03:17 AM

anyone?

monstergamer 03-27-2003 04:31 AM

i get the same thing
using 2.3.0

user360 03-27-2003 10:31 AM

is JamesUS still around?

TECK 03-27-2003 02:05 PM

"The hacker cannot guarantee to provide support for this hack."

Marzas 03-28-2003 09:49 PM

can someone add a upgrade to it so we can run sql files as well, cuz i get really ++++ed of these type of things, i'm sure its not a hard thing to do.

Intex 03-31-2003 01:37 PM

/me clicks Install. Thx for the hack.

GZ_Tanis 04-11-2003 02:24 AM

Quote:

03-28-03 at 06:43 PM Marzas said this in Post #21
can someone add a upgrade to it so we can run sql files as well, cuz i get really ++++ed of these type of things, i'm sure its not a hard thing to do.

I am not at all a programmer but I did notice some spaces in very unusual places. I changed the query file and everything seemd to be working now try this copy here. BTW I am using 2.3.0 and it did work for me.

GZ_Tanis 04-11-2003 02:28 AM

Quote:

01-02-02 at 01:36 PM Dalius said this in Post #3
I did exactly what it sais but....

whats with the gap?


To remove this gap change the code from the first post to this

makenavselect("Database Maintanence", );

chavalo2 04-24-2003 05:24 AM

Quote:

04-11-03 at 03:28 AM GZ_Tanis said this in Post #24
To remove this gap change the code from the first post to this

makenavselect("Database Maintanence", );

Try

Code:

makenavselect("Database Maintanence");
to really correct the gap

MarkL 04-25-2003 04:14 AM

Yeah, I upgraded to the new query.php file, but I still get this error whenever trying to run a query...

Database error in vBulletin Control Panel 2.3.0:

Invalid SQL: Array
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'Array' at line 1

mysql error number: 1064

Date: Friday 25th of April 2003 01:13:12 AM
Script: harrypotter/harrypotter/admin/query.php[/url]
Referer: harrypotter/admin/query.php[/url]

Anyone know what the problem could be? :$ Plus, there goes the whole double directory thing again. i don't know why it's doing that. :$

mmmender 05-07-2003 07:26 PM

i uploaded the new query.php file also and i'm still getting errors!

anyone?

csidlernet 06-02-2003 08:22 AM

Thankyou very much!

WitchyT 09-04-2003 06:51 AM

I'm getting errors too. :\ Although I'm not getting the double directory thing but I got the same error otherwise.

MaDCaT75 09-04-2003 07:12 AM

Can anyone confirm that this works correctly?

lasto 09-04-2003 07:44 AM

this one in this post works fine on 2.3

also read the full posts as it tells you info you need to know

https://vborg.vbsupport.ru/showthrea...atabse+queries

StrykerContact 09-04-2003 10:02 PM

Very nice, thanks.

*Installed*

StrykerContact 09-05-2003 11:02 PM

I am having problems, none of the queries I have ran work, I am going to uninstall this and replace it with fireflys. Sorry.

lasto 09-05-2003 11:10 PM

Quote:

Today at 01:02 AM StrykerContact said this in Post #33
I am having problems, none of the queries I have ran work, I am going to uninstall this and replace it with fireflys. Sorry.


nothing to install ! just delete it from the admin folder thats all as its a stand alone and its runs every query ive thrown at it.


All times are GMT. The time now is 12:50 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.01508 seconds
  • Memory Usage 1,785KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (34)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete