Subject Re: [firebird-support] Re: External Table Guidelines
Author Milan Babuskov
legrand_legrand_63 wrote:
> Why don't you add a csv import format as the ones proposed in IBExpert
> (insertex) or FSQL into FBexport or into Flamerobin ?
>
> I think this has already asked for FBexport at
> http://sourceforge.net/tracker/index.php?func=detail&aid=1195803&group_id=58913&atid=489270

Reason is quite simple: not enough time. I even missed this year's
Conference as I'm way too busy. I started my own company 3 weeks ago,
and still need to find where my head is ;) I also took a few hours a
day of my sleep time to produce FlameRobin 0.8.1 just in time for the
Conference. I'm afraid CSV import is very, very low on the list of
priorities, esp. since a 10-line PHP script does the job just fine:

<?
$link = ibase_connect('employee.fdb', 'sysdba', '*****');
$fp = fopen('import.csv', 'r');
while ($line = fgetcsv($fp))
ibase_query('insert into foo (x,y,z) values(?,?,?)', $line);
fclose($fp);
?>

Just add some error checking, and perhaps select fields from CSV file
(i.e. $line array) if you don't need them all and you're done.

--
Milan Babuskov
http://www.flamerobin.org