Loading ...
Sorry, an error occurred while loading the content.

RE: [PBML] The best option for DB SQL insertion...

Expand Messages
  • Franki
    mmmm thats not a bad idea... thanks for the tip... thanks again. rgds Frank ... From: Jenda Krynicky [mailto:Jenda@Krynicky.cz] Sent: Monday, 27 January 2003
    Message 1 of 8 , Jan 27, 2003
    View Source
    • 0 Attachment
      mmmm thats not a bad idea... thanks for the tip...

      thanks again.


      rgds

      Frank

      -----Original Message-----
      From: Jenda Krynicky [mailto:Jenda@...]
      Sent: Monday, 27 January 2003 5:44 AM
      To: perl-beginner@yahoogroups.com
      Subject: Re: [PBML] The best option for DB SQL insertion...


      From: "Franki" <frankieh@...>
      > The script will be reading those files, and connecting to a MySQL
      > server on another machine and loading the data into it..
      >
      > Now I have two options here (both are easy enough to do) one is to use
      > DBI to do all the work using do(INSERT... and the other is to use
      > system calls to the MSQL client and pass it the SQL data...
      >
      > I just not sure what the best most resource efficient method is..

      $ins=$db->prepare(<<'*END*');
      INSERT INTO TableName (
      Field1, Field2, Field3, Field4
      ) VALUES (
      ?, ?, ?, ?
      )
      *END*
      ...

      while(...) {
      ...
      $ins->execute(@data);
      ...
      }

      Jenda
      ===== Jenda@... === http://Jenda.Krynicky.cz =====
      When it comes to wine, women and song, wizards are allowed
      to get drunk and croon as much as they like.
      -- Terry Pratchett in Sourcery


      Unsubscribing info is here:
      http://help.yahoo.com/help/us/groups/groups-32.html

      Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    Your message has been successfully submitted and would be delivered to recipients shortly.