Board index » delphi » Problem to make a query with Interbase module under PHP

Problem to make a query with Interbase module under PHP

Hello.

I have a problem that i can't fix.

I'm making a web site in PHP, i Have One computer that contains the WEB
server (and PHP Engine), and One computer with Interbase 5.5

I success to login into myy database (by using ibase_connect() ) function,
but, all my queries fails.

Dynamic SQL Error -901

What can be wrong ?
Is there a way to returns detail about the Dynamic error ?

Here my code: (of course this query works fine under Inerbase ISQL)

$SQLhost = "InterbaseDesktop:G:\BaseInterbase\PRINCIPALE.gdb";
     $SQLusername = "user";
     $SQLpassword = "password";
      $SQLconnect = ibase_connect ($SQLhost, $SQLusername, $SQLpassword);
     $query = "SELECT DISTINCT TYPE FROM ARCHIVES";

     $SQLResult = ibase_query($SQLconnect,$query); HERE THE ERROR is
Returned

     while ($row = ibase_fetch_object ($SQLResult)) {
     print $row->TYPE . "\n";
     }
     ibase_close ($SQLconnect);

Does someone, can help me?

 

Re:Problem to make a query with Interbase module under PHP


Try to change your [TYPE] field name. it is interbase reserved word.

Quote
>      $query = "SELECT DISTINCT TYPE FROM ARCHIVES";

hth,
-Jaimy
--
Jaimy Azle               Senior Developer
Center of Computer Development System
Faculty of Economics - Gadjah Mada University
http://www.ppkfeugm.com

Other Threads