in reply to Re^2: How to optimise " csv into mysql " using Text:CSV_XS and DBD::Mysql
in thread How to optimise " csv into mysql " using Text:CSV_XS and DBD::Mysql

But it isn't "something something", its "$fieldList."

  • Comment on Re^3: How to optimise " csv into mysql " using Text:CSV_XS and DBD::Mysql

Replies are listed 'Best First'.
Re^4: How to optimise " csv into mysql " using Text:CSV_XS and DBD::Mysql
by Your Mother (Archbishop) on Aug 06, 2015 at 15:33 UTC

    Ah, quite right... seems to be trusted data. But still quite right.

      seems to be trusted data

      Trusted data does make a good case for a quick and dirty solution, certainly if it is an ad hoc, temporary solution. However, it may engender the use of dynamic sql elsewhere. Or worse, stick around for a while and even get copied into other scripts because "it works."

      Personally, i often find that taking the time (and pain) of doing it correctly teaches me a few things.

        to be honest I don't exactly get the point. What actually wrong with the way I'm using placeholders (building the list).? The thing is, that I'm running this piece of code to import multiple files with different column names, and column counts. So building the placeholders looked like a good ( and only I could think off ) idea to me. I just don't find any better solution.