Subject | Re: [firebird-support] Re: Export all my blob data |
---|---|
Author | Milan Babuskov |
Post date | 2005-02-09T15:04:41Z |
willykelleher wrote:
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
>>You could write a simple PHP script in few minutes. Is PHP anIt's all in PHP user manual, InterBase functions are here:
> I guess I could try do you have any examples I could look at.
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