>>>>> "W" == Wk0007  <[EMAIL PROTECTED]> writes:


  W> foreach my $exp_id (values %experiments) {
  W>    eval {
  W>       my $q_delete_old_data = qq{DELETE DATA_TM
  W>                                   WHERE EXP_ID = $exp_id};
  W>       my $sth_delete_old_data = $dbh->prepare_cached($q_delete_old_data);

those var names are way too long since they live in such a small
scope. also why even have the temp var for the query text? and i like
here docs for those:

        my $sth = $dbh->prepare_cached( <<SQL ) ;
DELETE DATA_TM WHERE EXP_ID = $exp_id
SQL

with here docs you can format the SQL for readability (nice if you also
log/print it).

  W>       $sth_delete_old_data->execute();
  W>       $sth_delete_old_data->finish();

i don't think you need finish unless you are retreiving records. i have
done execute on deletes without it.

  W>       undef $sth_delete_old_data;

no need for that undef as it will be falling out of scope and destroyed
anyway.

uri

-- 
Uri Guttman  ------  [EMAIL PROTECTED]  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org
_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to