Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread Delphi for PHP
Tue, Feb 20 2007 2:13 PMPermanent Link

"Ivan Sine"

In the past I've used Developer Express - Express Web Framework with
DBISAM for web apps. This new Delphi for PHP is interesting.Is there
any reason to believe that it will not work with ElevateDB?
--
Tue, Feb 20 2007 4:52 PMPermanent Link

"Lance R."
Ivan Sine wrote:
> In the past I've used Developer Express - Express Web Framework with
> DBISAM for web apps. This new Delphi for PHP is interesting.Is there
> any reason to believe that it will not work with ElevateDB?

You would need the ODBC connector for ElevateDB when released.

Then use odbc_connect to connect to the database.

The following example would assume that PHP is on a Windows box.

Set up ODBC Connection with the ODBC Connector for ElevateDB to the
database.

Then your PHP code could look like:

<html>
<body><?php
$conn=odbc_connect('northwind','','');
if (!$conn)
  {exit("Connection Failed: " . $conn);}
$sql="SELECT * FROM customers";
$rs=odbc_exec($conn,$sql);
if (!$rs)
  {exit("Error in SQL");}
echo "<table><tr>";
echo "<th>Companyname</th>";
echo "<th>Contactname</th></tr>";
while (odbc_fetch_row($rs))
{
  $compname=odbc_result($rs,"CompanyName");
  $conname=odbc_result($rs,"ContactName");
  echo "<tr><td>$compname</td>";
  echo "<td>$conname</td></tr>";
}
odbc_close($conn);
echo "</table>";
?></body>
</html>
Wed, Feb 28 2007 12:19 PMPermanent Link

"R. Tipton"

"Lance R." <lance@lance.ws> wrote in message
news:BB82BBD2-FFAE-47D1-BBE9-E77C68230B12@news.elevatesoft.com...

> Then your PHP code could look like:
>
> <html>
> <body><?php
> $conn=odbc_connect('northwind','','');
> if (!$conn)
>   {exit("Connection Failed: " . $conn);}
> $sql="SELECT * FROM customers";
> $rs=odbc_exec($conn,$sql);
> if (!$rs)
>   {exit("Error in SQL");}
> echo "<table><tr>";
> echo "<th>Companyname</th>";
> echo "<th>Contactname</th></tr>";
> while (odbc_fetch_row($rs))
> {
>   $compname=odbc_result($rs,"CompanyName");
>   $conname=odbc_result($rs,"ContactName");
>   echo "<tr><td>$compname</td>";
>   echo "<td>$conname</td></tr>";
> }
> odbc_close($conn);
> echo "</table>";
> ?></body>
> </html>


<Head scratching on>
I was going to have a go at Delphi PHP
but after the above example I will give
it a miss. Frown
<Head scratching off>

Its only 12 years since the easiest RAD ever
D1 hit the market and we all switched from
some xbase or other, now with NET and
C# and Vista not measuring up where do
we go ?
The answer get all versions of *nix to agree
on a standard (impossible) and come up
with something >= than Kylix.
I thought we were on our way with SuSE
and Kylix 3 and Dbisam but it all seems to
have fell flat on its face sighhhhhh.

Rita



Sat, Mar 17 2007 9:38 PMPermanent Link

pk
"R. Tipton" <nospam@nospam.com> wrote:


<Head scratching on>
I was going to have a go at Delphi PHP
but after the above example I will give
it a miss. Frown
<Head scratching off>


As far as I understand, Delphi for PHP uses ADODB which is kind of like ADO in PHP.   It supports a lot of databases but doesn't seem to include DBISAM.  It is not difficult to write a ADODB
driver for DBISAM though.  Just download Delphi4PHP and you can build a PHP extension for this.   I think Delphi4PHP supports Kylix too.

PK
Mon, Mar 19 2007 5:47 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com


<< As far as I understand, Delphi for PHP uses ADODB which is kind of like
ADO in PHP.   It supports a lot of databases but doesn't seem to include
DBISAM.  It is not difficult to write a ADODB driver for DBISAM though.
Just download Delphi4PHP and you can build a PHP extension for this.   I
think Delphi4PHP supports Kylix too. >>

You can use our ODBC driver with PHP just fine.  Just use the built-in PHP
support for using ODBC:

http://us2.php.net/odbc

--
Tim Young
Elevate Software
www.elevatesoft.com

Image