i belive doing a select * is always bad incase the order of the columns change.. therefor i sugest we do this
if ($CLIcampaign)
{
$stmtA = "SELECT campaign_id,lead_order,hopper_level,auto_dial_level,local_call_time,lead_filter_id,use_internal_dnc,dial_method,available_only_ratio_tally
,adaptive_dropped_percentage,adaptive_maximum_level,dial_statuses,list_order_mix from vicidial_campaigns where campaign_id='$CLIcampaign'";
}
else
{
$stmtA = "SELECT campaign_id,lead_order,hopper_level,auto_dial_level,local_call_time,lead_filter_id,use_internal_dnc,dial_method,available_only_ratio_tally
,adaptive_dropped_percentage,adaptive_maximum_level,dial_statuses,list_order_mix from vicidial_campaigns where active='Y'";
}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$rec_count=0;
while ($sthArows > $rec_count)
{
@aryA = $sthA->fetchrow_array;
$campaign_id[$rec_count] = "$aryA[0]";
$lead_order[$rec_count] = "$aryA[1]";
if (!$CLIlevel)
{$hopper_level[$rec_count] = "$aryA[2]";}
else
{$hopper_level[$rec_count] = "$CLIlevel";}
$auto_dial_level[$rec_count] = "$aryA[3]";
$local_call_time[$rec_count] = "$aryA[4]";
$lead_filter_id[$rec_count] = "$aryA[5]";
$use_internal_dnc[$rec_count] = "$aryA[6]";
$dial_method[$rec_count] = $aryA[7];
$available_only_ratio_tally[$rec_count] = $aryA[8];
$adaptive_dropped_percentage[$rec_count] = $aryA[9];
$adaptive_maximum_level[$rec_count] = $aryA[10];
$dial_statuses[$rec_count] = $aryA[11];
$list_order_mix[$rec_count] = $aryA[12];
please let me know if this is acceptable