Subject RE: [ib-support] How can you link Firebird to PHP?
Author Javier Rodríguez
For those arround the Interbase and PHP bussines , I'm doing some stuff to
emulate the TQuery TDatabase TDataset and TDBGrid that Borldand shipped in
Delphi in PHP.. hell , maybe someone could come up whith a frm->php tool
later :)

Anyway , here is the code to create a (very) limited TQuery that should make
the deligth of those that come to PHP rigth now.

It's Free , so it may be good :)

----- --- start file ---
// Emulacion de una TQuery de Delphi para PHP v0.01 19/9/2002
// (c) Francisco Javier Rodriguez 2002
// Usa y abusa de este codigo , pero no quites estas cuatro lineas :)
// consultor_sis at ; 966516760 at

class TQuery
var $sql;
var $database;
var $numres; //Numero de resultados en el datasets de la query
var $dataset; // Conjunto de resultados
var $conexion;

function TQuery() //Es una funcion de incializacion , segun parece;

function sqltext ($sql)
$this->sql= $sql;
function exec()
function conecta($bbdd,$usuario,$pass)
if (!isset($usuario)) $usuario="SYSDBA";
if (!isset($pass)) $pass="masterkey";
$this->conexion = ibase_connect($bbdd,$usuario,$pass,"ISO8859_1",100,1);
function resquery()
$i = 0;
while (ibase_fetch_row($dataset)) $i++;
------- file ends here ---
to test it , as php...

--- test.php starts here ------

include "";

$query = new TQuery();
$query->SQLText("Select * from MPLAN");
// now , you cann access results in $query->Dataset as usual

---- end test.php----

Next thing will be create a fieldbyname method , and some way to attach the
TQuery->Dataset to the now in coding TDBGrid->Dataset

Hope this be of use to someone

(Not to much off-topic i think ... hullo , heLen! )