in reply to Query Subroutine

Should the second run_query call be for $decl_reason ? What i see is (looks like running the same query both times):
$apr_decl = "SELECT ..."; # Runs Query @ap = &run_query($apr_decl); print APR "CRAC_EVNT_DATA_T, Number Declined\n"; print APR "@ap"; $decl_reason = "SELECT ...;" # Runs Query @reason = &run_query($apr_decl); print REASON "CRAC_EVNT_DATA_T, Number Declined\n"; print REASON "@reason";
If that's not the issue, can you provide output from the debugging statements you have in there?

general question (i see this is just a snippet) -- do you have use strict; and use warnings; off or are you just pre-declaring all the vars at the top?

Replies are listed 'Best First'.
Re^2: Query Subroutine
by Fuism (Beadle) on Aug 08, 2005 at 03:48 UTC
    Pre-declaring at the top. I have been told to always use strict and warnings but I dont... I basically just copy and paste the code just changing the query statement. I didnt even see what you pointed out that I forgot to change the variable.
      I have been told to always use strict and warnings but I dont.
      Definitely do. You're just asking for nasty debugging problems if you don't .. in general, no reason not to--actually the opposite because it will save time by pointing out problems and potential problems to you. Try adding it to this program and see what pops..
      Pre-declaring at the top.
      Take a look at the thread coding rules, and in particular merlyn's reply Re: coding rules