Subject Re: [firebird-php] Re: Problems about PHP connect Firebird
Author Lester Caine
Tommy Cheng wrote:
> I used the following PHP to connect but i can't :
>
> <?php
> $host = 'localhost:C:\AppServ\Firebird\Data.FDB';
> $username = 'SYSDBA'
> $password = 'masterkey'
> $dbh = ibase_connect($host, $username, $password);
> $stmt = 'SELECT * FROM CUSTOMER';
> $sth = ibase_query($dbh, $stmt);
> while ($row = ibase_fetch_object($sth)) {
> echo $row->email, "\n";
> }
> ibase_free_result($sth);
> ibase_close($dbh);
> ?>
>
> something wrong ?

Looks fine - so what is the error message?

p.s. Make sure to remove the gds32.dll that comes with PHP - use the copy
Firebird supplies when it installs.
See notes on http://uk.php.net/manual/en/function.ibase-connect.php for other
hints

--
Lester Caine - G8HFL
-----------------------------
Contact - http://home.lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://home.lsces.co.uk
MEDW - http://home.lsces.co.uk/ModelEngineersDigitalWorkshop/
Firebird - http://www.firebirdsql.org/index.php