Page 1 of 4

[BETA] Database Explorer v1.0.1

Posted: Thu Jul 03, 2008 10:07 pm
by opalelement
Modification Name: Database Explorer v1.0.1
Author: Opalelement

Modification Description:: View tables, run database tools, execute custom queries into your database.
Modification Version:: v1.0.1

Requirements: Tested and created with PHP 4.4.4 and MySQL 4.1.14-nt (NOTE: Has MySQL functions in it so will ONLY work with MySQL for now)

Modification Download: dbexplorer101.zip v1.0.1

Features:
  • Easy viewing of database through ACP
  • Queries can be run through the ACP
  • Visual database allows you to see the tables and click to see the table contents.
  • Query box always on page with current executed query written inside.
  • Ability to execute many queries at once by separating with a semicolon (;)
  • Export of tables
  • Auto-module installer. Only installation is adding of two lang entries and opening a file.
  • Warning in header telling if there is an update.
  • Minor Fix Field names now in proper case according to database structure.
Released in previous version.
New in most recent version (1.0.2)

Planned:
  • Support for other database types besides MySQL
  • Fix table exporting (see bugs)
  • Pagination
  • Sorting through results
  • "Select All" option on default screen's checkboxes

- Feature planned for next release (critical)
- Feature planned as a priority but not critical
- Feature planned to be implemented in future releases


Known Bugs:
  • EXPORT comment style will comment the first INSERT and entire CREATE statements, making the exporting system useless.
Older versions:

Re: [BETA] Database Explorer v1.0.0 Beta

Posted: Fri Jul 04, 2008 12:18 am
by mahdi22
its good mod
i will test it later

and i uploaded to my site a direct link
http://www.ll22ll.com/includes/other/dbexplorer100b.zip

MmS

Re: [BETA] Database Explorer v1.0.0 Beta

Posted: Fri Jul 04, 2008 12:28 am
by opalelement
Thank you very much I think I am about to have a free host but I can put your link up there too if you want

Re: [BETA] Database Explorer v1.0.0 Beta

Posted: Fri Jul 04, 2008 9:18 am
by stickerboy
I have DEBUG enabled and get this error showing when I run a query

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/acp/acp_sql.php on line 113: Undefined variable: result
[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:2975)
[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:2975)
[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:2975)
[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:2975)
Other than that, it looks good :)

*edit*
Ok, I had a quick browse through the code there - some minor changes that might help.
Most to make use of DBAL and work with other databases ;)

Instead of mysql_fetch_row(), use $db->sql_fetchrow()
For queries that will load a very long list, you could add a pagination function (easier than it looks :P)
$db->sql_query_limit() with the correct arguments handles that nicely.
sql_affectedrows() can be used in place of mysql_num_rows, but not for a SELCT query.
More info on that and alternatives in this topic - http://www.phpbb.com/community/viewtopi ... &t=1031135
Hope this helps, I'm already finding it really useful :P

Re: [BETA] Database Explorer v1.0.0 Beta

Posted: Fri Jul 04, 2008 1:21 pm
by tupeu
This is a great mod but i need PHP5 support please!

Re: [BETA] Database Explorer v1.0.0 Beta

Posted: Fri Jul 04, 2008 1:40 pm
by stickerboy
tupeu wrote:This is a great mod but i need PHP5 support please!
I'm running php5.2.6 and it works perfectly fine on my system :?

Re: [BETA] Database Explorer v1.0.0 Beta

Posted: Fri Jul 04, 2008 1:44 pm
by tupeu
OK, if it`s working for you it must work for my PHP5 too
Unfortunately the download is not working :roll:

EDIT: Found it a few posts down...
10x

Re: [BETA] Database Explorer v1.0.0 Beta

Posted: Fri Jul 04, 2008 3:08 pm
by opalelement
Fixed the download link (Thanks mahdi22 for hosting it for me)

I never thought to run it in debug mode :O I will do that today as well as change the sql functions.

Re: [BETA] Database Explorer v1.0.0 Beta

Posted: Fri Jul 04, 2008 4:04 pm
by opalelement
Fixed the debug error cherokee was getting...

I don't know how to fix this one though. Here is the code (lines 52 and 53)

Code: Select all

					$query_type		= strtoupper($splitagain[0]);
					$query_type_c	= strtoupper($splitagain[1]);
Returns this in debug mode:

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/acp/acp_sql.php on line 53: Undefined offset: 1
Any suggestions?

Re: [BETA] Database Explorer v1.0.0 Beta

Posted: Fri Jul 04, 2008 9:25 pm
by mahdi22
opalelement wrote:Thank you very much I think I am about to have a free host but I can put your link up there too if you want
Fixed the download link (Thanks mahdi22 for hosting it for me)
u r welcome

and and i like the Idea of the mod

it will help many people how Don't now to use phpmyadmin

Re: [BETA] Database Explorer v1.0.0 Beta

Posted: Fri Jul 04, 2008 10:04 pm
by opalelement
I'm thinking of in later addons making it so you can see example sql queries tutorial kind of thing or maybe like a confirmation thing telling what the output will do... Also a kind of dropdown box selection where you can choose what you want to do and stuff. Sounds tricky but I will try and see what I can do :D

Re: [BETA] Database Explorer v1.0.0 Beta

Posted: Sat Jul 05, 2008 2:34 am
by princexxx
Thx for making my Requested Mod.........But i had installed it and when clicking on sql tab it was showing many errors........Like

[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:2975)

Can you help me.........

And in your DIV instructions there is you have shown that to make ACP_SQL Category In intruction 3 and it's repeated in 4 point also as the same.......

One more problem I can't find 'DATABASE' in 'SQL' It was only showing in maintanece tab........Any idea Please help me Out!

Re: [BETA] Database Explorer v1.0.0 Beta

Posted: Sat Jul 05, 2008 2:42 am
by opalelement
If you upload the included files, give me a URL to your board, and make me an admin real quick I will set up the modules.

Note to everyone, I am working on the next update and it will have more than this one, including (hopefully if I can get it to work) an auto module installer.

Re: [BETA] Database Explorer v1.0.0 Beta

Posted: Sat Jul 05, 2008 2:48 am
by princexxx
I will Upload everything but what about language edit??????? Ok i will this toooo.........
Do you want the link of my site???
But its warez site!

Re: [BETA] Database Explorer v1.0.0 Beta

Posted: Sat Jul 05, 2008 2:57 am
by opalelement
Okay I registered, now just make me an admin for a sec and I will set it up