Subject Re: [firebird-php] Formatting blobs into tables
Author Lester Caine
Robin Davis wrote:

> Hi,
>
> I can retrieve stored html with the following code, but I can't output
> it into an html table with two columns. Could anybody [point me in the
> right direction to learn how to?
>
> <?
> $dbh =
> ibase_connect('C:/data/artists.fdb','*****','******','ISO8859_1',0,1);
> $sql="SELECT COMPILATION FROM WOMEN ORDER BY LASTNAME ASC";
> $result=ibase_query($sql)or die(ibase_errcode());
>
> while ($row=ibase_fetch_row($result)){
> $img[]=ibase_blob_echo($row[0]);
> }
>
> ibase_free_result($result);
> ibase_close($dbh);
>
> ?>
>
> Thanks a lot,
>
> Rob Davis
> (Using Apache/2.0.54 (Win32) PHP/5.1.1 and Firebird 2 (Beta) on an XP
> machine)
Nice setup

This is a 'how long is a piece of string' type question.
Without knowing what the rest of your page generation code looks like it
is difficult.
A good start for building tables from data is the rs2html function in
ADOdb http://phplens.com/lens/adodb/docs-adodb.htm#rs2html
The code will show you how to do it, but I suspect you need to decide
how you are going to build pages, and something like smarty
http://smarty.php.net/ provides a template framework.

Any of the php code sample site will provide other examples, and even
ibWebAdmin has a nice format for that http://www.ibwebadmin.net/ you do
have THAT tool already - don't you :)

--
Lester Caine
-----------------------------
L.S.Caine Electronic Services
Treasurer - Firebird Foundation Inc.