Re: Writing 100+ fields with Perl DBI

2001-07-31 Thread Nelson Goforth
You are correct, of course, Werner. I was thinking along the wrong path - of trying to write AS I looped (as I was doing with the text file), rather than using the loop to build the INSERT statement and THEN writing to the database. Christopher Jones also provided me with a sample of very bas

Re: Writing 100+ fields with Perl DBI

2001-07-31 Thread Werner Stuerenburg
I don't see the problem. If you have a table with 120 columns and need to populate it, do you not want to do it with one insert statement? What else? I am not very familiar with perl, but in php it would be easy for me to construct the insert statement: You can read the columns names into one ar

Re: Writing 100+ fields with Perl DBI

2001-07-31 Thread David Mintz
On Tue, 31 Jul 2001, Nelson Goforth wrote: > > And this works fine for the text file - but from what I've seen I > probably can't carry over the iteration through the (up to) 100 > actual survey questions. I named the MySQL fields 'q1', 'q2', > anticipating some way to do a loop, but I can't

Writing 100+ fields with Perl DBI

2001-07-31 Thread Nelson Goforth
In my application I'm writing up to 120 fields of data in one swoop (the results of a sort of survey). I'm using Perl DBI with MySQL. Each survey has several fields of data like 'name' (stored as parameters in the CGI object $asmt) and then up to 100 actual survey questions (Q1, Q2, etc). Un