[BETA] Database Explorer v1.0.1

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Scam Warning
princexxx
Registered User
Posts: 82
Joined: Fri May 09, 2008 2:10 pm

Re: [BETA] Database Explorer v1.0.1

Post by princexxx »

It gives me this error after running some queries from it-

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/acp/acp_sql.php on line 58: Undefined offset: 1
[phpBB Debug] PHP Notice: in file /adm/index.php on line 150: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3184)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 152: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3184)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 153: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3184)
[phpBB Debug] PHP Notice: in file /adm/index.php on line 154: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3184)
But those queries run succesfully but don't show Me the succesfull message! Instead show me Above error Message.....
opalelement
Registered User
Posts: 315
Joined: Wed Dec 27, 2006 4:05 am

Re: [BETA] Database Explorer v1.0.1

Post by opalelement »

What queries did you run that gave that?
princexxx
Registered User
Posts: 82
Joined: Fri May 09, 2008 2:10 pm

Re: [BETA] Database Explorer v1.0.1

Post by princexxx »

Ok Here it is but These errors are always Comes when ever i run Any queries.....But they Run succesfully ...the only thing is that it don't show me the confirmation Message! Instead it gives Above errors...

Code: Select all

INSERT INTO `phpbb_config` (`config_name` ,`config_value` ,`is_dynamic` )VALUES ('x_users_show', '1', '0');
		INSERT INTO `phpbb_config` (`config_name` ,`config_value` ,`is_dynamic` )VALUES ('x_users_number', '0', '0');
		INSERT INTO `phpbb_config` (`config_name` ,`config_value` ,`is_dynamic` )VALUES ('x_users_guests', '1', '0');
		INSERT INTO `phpbb_config` (`config_name` ,`config_value` ,`is_dynamic` )VALUES ('x_users_count_bots', '1', '0');
opalelement
Registered User
Posts: 315
Joined: Wed Dec 27, 2006 4:05 am

Re: [BETA] Database Explorer v1.0.1

Post by opalelement »

Weird, works fine for me... (now i have to go delete those rows lol)

Code: Select all

58: $query_type_c	= strtoupper($splitagain[1]);
That is what would get the second word, in case it needs to check more specifically what you are doing... This is so I can enable "CREATE TABLE" but not "CREATE DATABASE", etc...

After testing, it appears I only get that error when debug is turned on... which makes me wonder...


[two minutes later]
Got it!First of all, you have to have debug on... If you never want these errors you can go to {phpbb_root_path}/config.php and you can comment out the line that says:
define('DEBUG', true);

If thats not on then I don't know whats happening.
Second, the debug is because of the very last character:
INSERT INTO `phpbb_config` (`config_name` ,`config_value` ,`is_dynamic` )VALUES ('x_users_show', '1', '0');
INSERT INTO `phpbb_config` (`config_name` ,`config_value` ,`is_dynamic` )VALUES ('x_users_number', '0', '0');
INSERT INTO `phpbb_config` (`config_name` ,`config_value` ,`is_dynamic` )VALUES ('x_users_guests', '1', '0');
INSERT INTO `phpbb_config` (`config_name` ,`config_value` ,`is_dynamic` )VALUES ('x_users_count_bots', '1', '0');
Stupid me, it splits the queries at the ; and then by space, so it is trying to get the [1] index of a blank line, meaning it doesn't exist. The queries run successfully because that is at the end, so it goes through the others before the error.

I will come up with a quick fix for that.
opalelement
Registered User
Posts: 315
Joined: Wed Dec 27, 2006 4:05 am

Re: [BETA] Database Explorer v1.0.1

Post by opalelement »

Simple fix:)

Open includes/acp/acp_sql.php
Find:

Code: Select all

					$query_type_c   = strtoupper($splitagain[1]);
Replace with:

Code: Select all

					$query_type_c	= $query_type ? strtoupper($splitagain[1]) : '';
princexxx
Registered User
Posts: 82
Joined: Fri May 09, 2008 2:10 pm

Re: [BETA] Database Explorer v1.0.1

Post by princexxx »

Ok i have changed those things but I can't check till i have to run any queries in it.....Hope it will not show that error again! Thanks for your help mate!

And One more Thing if you Can Make a Drop botton also.....Because for that i have to go to my phpmyadmin!
Actually i don't have to drop whole table just want to Delete all data in a specific table....Hope you can help!
opalelement
Registered User
Posts: 315
Joined: Wed Dec 27, 2006 4:05 am

Re: [BETA] Database Explorer v1.0.1

Post by opalelement »

Code: Select all

DELETE FROM table_name
Most people only consider it with the "WHERE" on it, but that will erase everything from it and leave the table.
princexxx
Registered User
Posts: 82
Joined: Fri May 09, 2008 2:10 pm

Re: [BETA] Database Explorer v1.0.1

Post by princexxx »

Thanks now everything is working Fine....... :D
simvader
Registered User
Posts: 144
Joined: Thu Sep 06, 2007 5:54 pm
Location: Netherlands
Contact:

Re: [BETA] Database Explorer v1.0.1

Post by simvader »

Bookmarked this one,

maybe an auto backup (with e-mail) wil make this more better?
:)
simvader
Registered User
Posts: 144
Joined: Thu Sep 06, 2007 5:54 pm
Location: Netherlands
Contact:

Re: [BETA] Database Explorer v1.0.1

Post by simvader »

Thanks! 8-)
simvader
Registered User
Posts: 144
Joined: Thu Sep 06, 2007 5:54 pm
Location: Netherlands
Contact:

Re: [BETA] Database Explorer v1.0.1

Post by simvader »

There is something weird in the installer when you use another prefix, you cant install it ;)

Furthermore i like a "select" a option to select all the tables :)
opalelement
Registered User
Posts: 315
Joined: Wed Dec 27, 2006 4:05 am

Re: [BETA] Database Explorer v1.0.1

Post by opalelement »

simvader wrote:There is something weird in the installer when you use another prefix, you cant install it ;)
The auto installer didn't work on 3.04 lol I tried but it wasn't showing up and I didn't wanna troubleshoot it
simvader
Registered User
Posts: 144
Joined: Thu Sep 06, 2007 5:54 pm
Location: Netherlands
Contact:

Re: [BETA] Database Explorer v1.0.1

Post by simvader »

oops, i meant a sellect all...

Can you use the Umil? Maybe that works?
opalelement
Registered User
Posts: 315
Joined: Wed Dec 27, 2006 4:05 am

Re: [BETA] Database Explorer v1.0.1

Post by opalelement »

I might make the select all option since it is easy but I really stopped development on this, all I do is give support and if a small feature is requested I give the lines to add/change
Locked

Return to “[3.0.x] MODs in Development”