Changeset 16226


Ignore:
Timestamp:
2008-06-27T15:24:51+12:00 (16 years ago)
Author:
mdewsnip
Message:

Changed a "DELETE FROM" then "INSERT INTO" into a "INSERT OR REPLACE", for simplicity (and hopefully efficiency too).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/dbutil.pm

    r16225 r16226  
    285285
    286286    my $safe_infodb_key = &sqlite_safe($infodb_key);
    287     print $infodb_handle "DELETE FROM data WHERE key='" . $safe_infodb_key . "';\n";
    288     print $infodb_handle "INSERT INTO data (key, value) VALUES ('" . $safe_infodb_key . "', '" . &sqlite_safe($infodb_entry_value) . "');\n";
     287    print $infodb_handle "INSERT OR REPLACE INTO data (key, value) VALUES ('" . $safe_infodb_key . "', '" . &sqlite_safe($infodb_entry_value) . "');\n";
    289288
    290289    # If this infodb entry is for a document, add all the interesting document metadata to the
Note: See TracChangeset for help on using the changeset viewer.