I'm Lost Without YOUR Help :(

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
handrea
Forum Newbie
Posts: 7
Joined: Mon Dec 20, 2004 5:51 am
Contact:

I'm Lost Without YOUR Help :(

Post by handrea »

Hi,

I'm working on a project and I got stuck at one point!
I'm using PHP 4.3 and Firebird 1.0 Database. I can to connect to the database server and run some queries but I'm not able to get the query plan used to perform the sql query. Is there any php function which returns the plan not just the query result???? If there isn't...how can I resolve this problem?
Please help me, I need a solution ASAP :(

Thanx,
Andrea :roll:
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

the plan, I believe you are talking about EXPLAIN, which I don't know if that's a standard SQL command or not..

Moved to Databases.
handrea
Forum Newbie
Posts: 7
Joined: Mon Dec 20, 2004 5:51 am
Contact:

Post by handrea »

EXPLAIN work fine in Oracle, MySQL but unfortunately it's not a standard command. There is no such keyword in InterBase.

:cry:
thegreatone2176
Forum Contributor
Posts: 102
Joined: Sun Jul 11, 2004 1:27 pm

Post by thegreatone2176 »

not 100% sure what you mean but if you mean you want to see whats executed then lets say you have

$link = "SELECT * FROM birds WHERE bird='$bird'";

then after its quiered just echo $link.
handrea
Forum Newbie
Posts: 7
Joined: Mon Dec 20, 2004 5:51 am
Contact:

Post by handrea »

Queries work fine in InterBase, I can get the result of the SELECT... statement, but I just want to know what execution plan InterBase uses.
There is a command line utility ISQL. When I type in a query, It displays the plan as well, not just the query.
ex. I connect to my database with isql and issue the select query. This way I can get the ex. plan and the result as well.

SQL> select * from new_table;

PLAN (NEW_TABLE NATURAL)

KD
============

1

Is there any way I can display this with PHP?
Post Reply