Subject | Re: [firebird-support] PHP and Firebird? |
---|---|
Author | Uwe Oeder |
Post date | 2005-01-31T15:10:28Z |
Yes it is very easy just enable the built in Interbase support module and
off you go. Here is a straight forward simple database access script. Just
ignore the $this-> it is for class access.
$this->MyHost =
'localhost:D:\Projects\Webpage\Documents\CreativeInfo\CreativeInfoDB.FDB' ;
$this->MyUsername = 'sysdba' ;
$this->MyPassword = 'masterkey' ;
$SQLStatement = 'SELECT * FROM Accounts WHERE AccType = 1' ;
$this->MyDBHandle =
ibase_connect($this->MyHost,$this->MyUsername,$this->MyPassword) or
die('error in db connect') ;
$this->MyDBQuery = ibase_prepare($this->MyDBHandle,$SQLStatement) or
die(ibase_errmsg()) ;
$this->MyDBDataset = ibase_execute($this->MyDBQuery) or die(ibase_errmsg()) ;
while (($MyRowData = ibase_fetch_row($this->MyDBDataset)) != false )
{
$OutPut[] = $MyRowData ;
}
ibase_free_result($this->MyDBDataset) ;
ibase_free_query($this->MyDBQuery) ;
ibase_close($this->MyDBHandle) ;
At 04:10 PM 1/31/2005, you wrote:
Head of IT Departement
Creative-Logic
20 Krupp Street
Southern Industrial Area
Windhoek
Namibia
P.O. Box 9274
Phone : 061-262 941
Fax : 061-262 130
Email : uweo@...
[Non-text portions of this message have been removed]
off you go. Here is a straight forward simple database access script. Just
ignore the $this-> it is for class access.
$this->MyHost =
'localhost:D:\Projects\Webpage\Documents\CreativeInfo\CreativeInfoDB.FDB' ;
$this->MyUsername = 'sysdba' ;
$this->MyPassword = 'masterkey' ;
$SQLStatement = 'SELECT * FROM Accounts WHERE AccType = 1' ;
$this->MyDBHandle =
ibase_connect($this->MyHost,$this->MyUsername,$this->MyPassword) or
die('error in db connect') ;
$this->MyDBQuery = ibase_prepare($this->MyDBHandle,$SQLStatement) or
die(ibase_errmsg()) ;
$this->MyDBDataset = ibase_execute($this->MyDBQuery) or die(ibase_errmsg()) ;
while (($MyRowData = ibase_fetch_row($this->MyDBDataset)) != false )
{
$OutPut[] = $MyRowData ;
}
ibase_free_result($this->MyDBDataset) ;
ibase_free_query($this->MyDBQuery) ;
ibase_close($this->MyDBHandle) ;
At 04:10 PM 1/31/2005, you wrote:
>Hi All,Mr. U. Oeder
>
>Is anyone using Firebird from PHP scripts? I've found ADOdb which
>looks possible. Are there any other ways to access a Firebird
>database from PHP?
>
>Thanks for any suggestions,
>Steve
>
>
>
>
>
>----------
>Yahoo! Groups Links
> * To visit your group on the web, go to:
> *
> <http://groups.yahoo.com/group/firebird-support/>http://groups.yahoo.com/group/firebird-support/
>
> *
> * To unsubscribe from this group, send an email to:
> *
> <mailto:firebird-support-unsubscribe@yahoogroups.com?subject=Unsubscribe>firebird-support-unsubscribe@yahoogroups.com
>
> *
> * Your use of Yahoo! Groups is subject to the
> <http://docs.yahoo.com/info/terms/>Yahoo! Terms of Service.
Head of IT Departement
Creative-Logic
20 Krupp Street
Southern Industrial Area
Windhoek
Namibia
P.O. Box 9274
Phone : 061-262 941
Fax : 061-262 130
Email : uweo@...
[Non-text portions of this message have been removed]