Subject | Re: How to publish a firebird database? |
---|---|
Author | turbomenda |
Post date | 2004-01-27T11:21Z |
--- In firebird-support@yahoogroups.com, "Alan McDonald" <alan@m...>
wrote:
language that supports Firebird (like PHP) and a connection to an
Firebird server.
PHP Example:
if(!($ibsock = ibase_pconnect
("192.168.76.12:E:\\GROT2000_B\\GROT2K.GDB", "PHP", "robot","WIN1250",
100,1)))
die("<BR><P ALIGN=CENTER><B>Problemy technicze,
przepraszamy.</B></P><BR>"); // technical problems we're sorry
$q = 'SELECT
INDEKS,STAN,STAN_PM,ZADYSP,CENA,NAZWA_GL,JM,IDP,PROGRAM,ILOSC ';
$q .= 'FROM STANY_MAG_WWW
("'.$TRYB.'","'.$MAGAZYN.'","'.$MAGAZYN2.'","'.$KM.'",'.$IDP.') ';
if(isset($ORD))
$q .= "ORDER BY $ORD COLLATE PXW_PLK";
$res= ibase_query($ibsock, $q);
$ii=0;
while($cc= ibase_fetch_row($res)){
if(!$aaa) {
echo('<TR class="headerrow"><TD><A
href="'.$PHP_SELF.'?ORD=">Lp.</A></TD><TD><A href="'.$PHP_SELF.'?
ORD=INDEKS">Indeks</A></TD><TD><A href="'.$PHP_SELF.'?
ORD=NAZWA_GL">Nazwa</A></TD><TD>JM</TD>');
echo('<TD><A href="'.$PHP_SELF.'?ORD=ILOSC%
20DESCENDING%2cNAZWA_GL">Dostêpna ilosc</A></TD><TD><A
href="'.$PHP_SELF.'?ORD=PROGRAM%2cNAZWA_GL">Program</A></TD></TR>');
$aaa=1;
}
$indeks=pretty_index($cc[0]);
$stan=$cc[1];
$stan_pm=$cc[2];
$zadysp=$cc[3];
$cena=$cc[4];
$nazwa_gl=$cc[5];
$jm=$cc[6];
$idp=$cc[7];
$program=$cc[8];
$ilosc=$cc[9];
$ii++;
echo("<TR ");
if(($ii & 1) == 1)
echo('class="oddrow"');
echo("><TD>");
echo("$ii");
echo
("</TD><TD>$indeks</TD><TD>$nazwa_gl</TD><TD>$jm</TD><TD>$ilosc</TD><T
D>");
if (!$IDP) echo('<A href="'.$PHP_SELF.'?IDP='.$idp.'">');
echo($program);
if (!$IDP) echo("</A>");
echo("</TD></TR>");
}
ibase_free_result($res);
wrote:
> > Hello all,on
> > Can anybody tell me the details of publishing a firebird database
> > the net? Is it obligatory to use PHP or XML?placing it on
> >
>
> Not use exactly what you mean but I'll take a guess.
> You make your db available (visible) to the internet by way of
> a machine which is visible to the internet.Well, not really. You need a webserver with server-side scripting
> You deliver content of the db via a myriad of ways, ASP, PHP, XML,
> webservices, and the list goes on.
> None of these methods are obligatory.
>
> Alan
language that supports Firebird (like PHP) and a connection to an
Firebird server.
PHP Example:
if(!($ibsock = ibase_pconnect
("192.168.76.12:E:\\GROT2000_B\\GROT2K.GDB", "PHP", "robot","WIN1250",
100,1)))
die("<BR><P ALIGN=CENTER><B>Problemy technicze,
przepraszamy.</B></P><BR>"); // technical problems we're sorry
$q = 'SELECT
INDEKS,STAN,STAN_PM,ZADYSP,CENA,NAZWA_GL,JM,IDP,PROGRAM,ILOSC ';
$q .= 'FROM STANY_MAG_WWW
("'.$TRYB.'","'.$MAGAZYN.'","'.$MAGAZYN2.'","'.$KM.'",'.$IDP.') ';
if(isset($ORD))
$q .= "ORDER BY $ORD COLLATE PXW_PLK";
$res= ibase_query($ibsock, $q);
$ii=0;
while($cc= ibase_fetch_row($res)){
if(!$aaa) {
echo('<TR class="headerrow"><TD><A
href="'.$PHP_SELF.'?ORD=">Lp.</A></TD><TD><A href="'.$PHP_SELF.'?
ORD=INDEKS">Indeks</A></TD><TD><A href="'.$PHP_SELF.'?
ORD=NAZWA_GL">Nazwa</A></TD><TD>JM</TD>');
echo('<TD><A href="'.$PHP_SELF.'?ORD=ILOSC%
20DESCENDING%2cNAZWA_GL">Dostêpna ilosc</A></TD><TD><A
href="'.$PHP_SELF.'?ORD=PROGRAM%2cNAZWA_GL">Program</A></TD></TR>');
$aaa=1;
}
$indeks=pretty_index($cc[0]);
$stan=$cc[1];
$stan_pm=$cc[2];
$zadysp=$cc[3];
$cena=$cc[4];
$nazwa_gl=$cc[5];
$jm=$cc[6];
$idp=$cc[7];
$program=$cc[8];
$ilosc=$cc[9];
$ii++;
echo("<TR ");
if(($ii & 1) == 1)
echo('class="oddrow"');
echo("><TD>");
echo("$ii");
echo
("</TD><TD>$indeks</TD><TD>$nazwa_gl</TD><TD>$jm</TD><TD>$ilosc</TD><T
D>");
if (!$IDP) echo('<A href="'.$PHP_SELF.'?IDP='.$idp.'">');
echo($program);
if (!$IDP) echo("</A>");
echo("</TD></TR>");
}
ibase_free_result($res);