Subject Re: [firebird-support] Re: Export all my blob data
Author Milan Babuskov
willykelleher wrote:
>>You could write a simple PHP script in few minutes. Is PHP an
> I guess I could try do you have any examples I could look at.

It's all in PHP user manual, InterBase functions are here:
http://www.php.net/manual/en/ref.ibase.php

You would have something like this:

ibase_connect("database.fdb", "sysdba", "masterkey");

$res = ibase_query("select nbr, data from issues");
while ($row = ibase_fetch_row($row, IBASE_TEXT))
{
$fp = fopen($row[0].'.txt', 'w+');
fputs($fp, $row[1]);
fclose($fp);
}
ibase_commit();

If your blobs are text, you can use IBASE_TEXT flag which converts
blobs to text fields, so it's really easy to use it. If your blobs
contain binary data, you need to use ibase_blob_open() and
ibase_blob_get() functions.

--
Milan Babuskov
http://fbexport.sourceforge.net
http://www.flamerobin.org