$account_number = $excel_array['Account Number']; $external_id = $excel_array['EXTERNAL_ID']; $full_name = $excel_array['FULL NAME']; $address = $excel_array['ADDRESS']; $mailzip = $excel_array['MAILZIP']; $billplan = $excel_array['BILL_PLAN']; $billcycle = $excel_array['BILL CYCLE']; $account_category = $excel_array['ACCOUNT_CATEGORY']; $fe = $excel_array['FE']; $dv = $excel_array['DV']; $ivr_flag = $excel_array['IVR']; $batch_code = $excel_array['BATCH']; $date_time = date('Y-m-d'); if ($account_number != "") { if ($error_flag != 2) { $trow = get_total_row('manual_base', 'account_number', $account_number); if ($trow > 0) { $update_sql = "UPDATE `manual_base` SET `ivr_flag`='{$ivr_flag}' where `account_number`='{$account_number}'"; mysql_query($update_sql); } else { $append_values .= "('{$code}','{$account_number}','{$external_id}','{$account_category}','{$full_name}','{$address}','{$mailzip}','{$billplan}','{$billcycle}','{$fe}','{$cur_file_name}','{$dv}','{$ivr_flag}','{$batch_code}'),"; } } } } //Remvoing Last comma in appended String $sql = substr($insert_sql . $append_values, 0, -1); mysql_query($sql); $trow = mysql_num_rows(mysql_query("select * from manual_base where 1")); $description = "Total row in Excel:" . $trow_in_excel . "Total Row in temprory Base : " . $trow; insert_log($userid, 10, 'manual_base', 0, $description);
function get_mailzip_list($fes_name) { $trow = get_total_row('base_temp', 'fe', $fes_name); $mailzip_list = ""; $alloc_fes_query = mysql_query("select DISTINCT `mail_zip` from `base_temp` where `fe`='{$fes_name}'"); if ($trow >= 1) { while ($alloc_fes_fetch = mysql_fetch_assoc($alloc_fes_query)) { $mail_zip = $alloc_fes_fetch['mail_zip']; if ($mailzip_list == "") { $mailzip_list .= $mail_zip; } else { $mailzip_list .= "," . $mail_zip; } } return $mailzip_list; } else { return "Pincode Error"; } }
<?php include 'config.php'; include 'db_functions.php'; extract($_GET); $result = get_total_row($table_name, $column_name, $value); echo $result;
<a href="javascript:;" onClick="show_create_fes('<?php echo $fes; ?> ')" class="small black button">ADD Fes</a> </span> <?php } ?> </th> <th align="right"> <span> Total -<?php echo get_total_row('base_temp', 'fe', $fes); ?> </span> </th> </tr> <?php $alloc_fes_query = mysql_query("select DISTINCT `mail_zip` from `base_temp` where `fe` ='{$fes}'"); $sno = 1; while ($alloc_fes_fetch = mysql_fetch_assoc($alloc_fes_query)) { $mail_zip = $alloc_fes_fetch['mail_zip']; $base_query = mysql_query("select * from `base_temp` where `mail_zip` ='{$mail_zip}' and `fe`='{$fes}'"); ?> <?php