AST_VDhopper.pl code optimization

Discussions about development of VICIDIAL and astGUIclient

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

AST_VDhopper.pl code optimization

Postby bobbymc » Thu Nov 13, 2008 5:54 pm

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
bobbymc
 
Posts: 425
Joined: Fri Jan 05, 2007 12:26 am

Postby mflorell » Thu Nov 13, 2008 6:34 pm

That is something we need to do throughout the codebase, do you have a patch against current SVN trunk?
mflorell
Site Admin
 
Posts: 18338
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby bobbymc » Thu Nov 13, 2008 7:10 pm

no sorry.. but this is the fix againt the latest svn trunk.. so this should work fine againt it
bobbymc
 
Posts: 425
Joined: Fri Jan 05, 2007 12:26 am

Postby bobbymc » Thu Nov 13, 2008 7:11 pm

i would be more then happy to look in the current svn trunk and give u any other sections.. but i dont know how to make patches =(
bobbymc
 
Posts: 425
Joined: Fri Jan 05, 2007 12:26 am

Postby mflorell » Thu Nov 13, 2008 8:12 pm

Download RapidSVN, that will get you halfway there.

If you are on Windows I would also recommend getting WinMerge.

http://www.eflo.net/VICIDIALwiki/tiki-i ... VN%3Ahowto
mflorell
Site Admin
 
Posts: 18338
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida


Return to Development

Who is online

Users browsing this forum: No registered users and 37 guests