Re: Accessing InterBase Database
| From: | Pascal Bruyez | Date: | Wed, 11 Jul 2001 23:03:32 +0000 |
| Subject: | Re: Accessing InterBase Database | ||
| References: | 1 2 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-8268@lists.php.net to get a copy of this message | ||
Hello Matthias ,
Could you send me the latest win32 php_interbase.dll , php4win is out !!!
Thanks very much in advance ,
Pascal
pascal.bruyez@free.fr
Matthias Endler <endler@upsys.de> a écrit dans le message :
NEBBIPICKKEKABFMMOFAGEPHCEAA.endler@upsys.de...
> Hi Winston,
>
> > Can anyone help me how to connect to Interbase database using PHP? I'm
> > running it in windows 98SE and OmniHTTPD webserver.
>
> make sure the php_ibase.dll is enabled in your php.ini. Should look like
> this:
>
> extension=php_ibase.dll
>
> (There's a bug in php_ibase.dll bundled with version 4.0.3 win32-binary
> distribution. You can connect but nothing else can be done.)
>
> You can get the latest win32 distro at http://www.php4win.de/.
>
> Here's a sample script:
>
> <?
> $dbh =
> @ibase_connect('/Programme/Borland/test/Test','SYSDBA','secret');
> if (!$dbh) die("Database connection failed!");
> $sql = "SELECT * FROM tb_test";
> $q = ibase_query($dbh,$sql);
> if (!$q) die("No results");
> while($row = ibase_fetch_object($q)) {
> print $row->DF_ID." ".$row->DF_NAME."<br>\n";
> // ^^^^^ ^^^^^^^
> // Fieldnames should alwas be upper case!
> // That's why the example from php.net will never work.
> }
> @ibase_close($dbh);
> ?>
>
> Everything else you can find at
> http://www.php.net/manual/ref.ibase.php
>
> Cheers,
> Matthias
>