in reply to DBI SQL adding array of values

(Reply to the revised node — people, don't do that, don't delete the original contents. This is more some temporary medium for communication, solving your technical problems; this is supposed to be an archive, too. Editing nodes this way destroys their value. Anyway, beck to your regular programme.)

If your data comes from Excel, you shouldn't worry about it not including empty cells to the left of any nonempty cells. So all you'd still have to do is make sure @data holds the same number of columns as the header array does. The easiest to achieve that is:

$#data = $#table;
If this creates extra columns, they'll be undef. Any undefined values in the data will be replaced with NULL in the database, by DBI.

If, however, people have put data in the wrong cells, all bets are off.

Replies are listed 'Best First'.
Re^2: DBI SQL adding array of values
by pmtolk (Acolyte) on Oct 28, 2004 at 05:29 UTC
    Sorry about the question disappearing I though it would add an update underneath, and thanks for all of your help it is much appreciated.