Page 1 of 1

I'm Lost Without YOUR Help :(

Posted: Fri Feb 11, 2005 2:04 am
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:

Posted: Fri Feb 11, 2005 2:28 am
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.

Posted: Fri Feb 11, 2005 2:36 am
by handrea
EXPLAIN work fine in Oracle, MySQL but unfortunately it's not a standard command. There is no such keyword in InterBase.

:cry:

Posted: Fri Feb 11, 2005 2:35 pm
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.

Posted: Mon Feb 14, 2005 2:08 am
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?