[thesite] Tip Harvester question (was: [***] Formatting tips )

jeff jeff at members.evolt.org
Sun Apr 1 21:44:20 CDT 2001


: From: Seth Bienek
: Would it be better for me to parse the
: emails (several dozen megs) into a big
: giant structure, and then insert them
: into the database with one query?

no and yes, in that order.  don't bother parsing them into a big giant
structure.  however, you should be inserting them as one giant query.

: And if so, would I do that by just looping
: the insert statements , or is there some
: "database ninja" technique for getting them
: all (several thousand) in one query?

sure, just do your logic inside the <cfquery> instead of outside.  like

<cfquery ...>
  <cfloop ...>
    INSERT INTO blah ()
    VALUES ()

notice the order of the tags -- many inserts, one connection.

good luck,


mailto:jeff at members.evolt.org

More information about the thesite mailing list