function second_appointment_letter_reserve3_print($personcd) { $sql = "SELECT `slno`,`groupid`,`assembly`,`pcname`,`personcd`,`person_name`,`person_designation`,`post_status`,\t\r\n\t`post_stat`,`officecd`,`office_name`,`office_address`,`post_office`,`subdivision`,`police_stn`,`district`,\r\n\t`pincode`,`dc_venue`,`dc_address`,date_format(`dc_date`,'%d/%m/%Y') as dc_date,`dc_time`,`rc_venue`,`traingcode`,`training_venue`,`venuecode`,\r\n\t`venue_addr1`,`venue_addr2`,date_format(`training_date`,'%d/%m/%Y') as training_date,`training_time`,date_format(`polldate`,'%d/%m/%Y') as polldate,`polltime` \r\n\tFROM `second_rand_table_reserve`"; $sql .= " where personcd ='{$personcd}'"; //echo $sql; exit; $rs = execSelect($sql); connection_close(); return $rs; }
function second_appointment_letter3($group_id, $forassembly) { $sql = "Select personnela.groupid,\r\n\t assembly.assemblycd,\r\n\t assembly.assemblyname,\r\n\t pc.pccd,\r\n\t pc.pcname,\r\n\t personnela.officer_name,\r\n\t personnela.personcd,\r\n\t office.office,\r\n\t office.address1,\r\n\t office.address2,\r\n\t office.postoffice,\r\n\t subdivision.subdivision,\r\n\t district.district,\r\n\t office.officecd,\r\n\t personnela.poststat,\r\n\t personnela.off_desg,\r\n\t poststat.poststatus\r\n\tFrom personnela\r\n\t Inner Join office On personnela.officecd = office.officecd\r\n\t Inner Join subdivision On subdivision.subdivisioncd = office.subdivisioncd\r\n\t Inner Join district On office.districtcd = district.districtcd\r\n\t Left Join pc On personnela.forpc = pc.pccd And personnela.forsubdivision =\r\n\t\tpc.subdivisioncd\r\n\t Left Join assembly On personnela.forassembly = assembly.assemblycd\r\n\t Inner Join poststat On personnela.poststat = poststat.post_stat "; $sql .= " where personnela.groupid='{$group_id}' and personnela.forassembly='{$forassembly}' and personnela.booked='P'"; $sql .= " order by personnela.groupid, personnela.poststat"; // print $sql; exit; $rs = execSelect($sql); connection_close(); return $rs; }
function delete_Termination($delcode) { $sql = "delete from termination where termination_id='{$delcode}'"; $i = execDelete($sql); connection_close(); return $i; }
function delete_prev_data_second_rand_reserve($forassembly, $forpc, $group_id) { $sql = "delete from second_rand_table_reserve where (slno<>0 or slno=0)"; if ($forassembly != "0" && $forassembly != "") { $sql .= " and assembly like '{$forassembly}%'"; } elseif ($forpc != "0") { $sql .= " and pcname like '{$forpc}%'"; } if ($group_id != "") { $sql .= " and groupid = '{$group_id}'"; } $i = execDelete($sql); //print $sql; exit; connection_close(); return $i; }
function get_person_ag_office($office, $forpc) { $sql = "Select Distinct personnela.personcd,\r\n\t personnela.officer_name,\r\n\t personnela.off_desg,\r\n\t personnela.assembly_off,\r\n\t personnela.assembly_perm,\r\n\t personnela.assembly_temp,\r\n\t personnela.epic,\r\n\t personnela.acno,\r\n\t personnela.partno,\r\n\t personnela.slno,\r\n\t personnela.poststat\r\n\tFrom personnela"; $sql .= " where personnela.officecd='{$office}' and personnela.forpc='{$forpc}'"; $rs = execSelect($sql); connection_close(); return $rs; }
function fatch_UserDtl($user_cd) { $sql = "Select user.code, user.user_id, user.category, user.creation_date, user.districtcd, user.subdivisioncd, user.parliamentcd\r\n\tFrom user where user.code='{$user_cd}'"; $rs = execSelect($sql); connection_close(); return $rs; }
function delete_dcrc($dcrc) { $sql = "delete from dcrc_party where dcrcgrp='{$dcrc}'"; execDelete($sql); $sql1 = "delete from dcrcmaster where dcrcgrp='{$dcrc}'"; $i = execDelete($sql1); connection_close(); return $i; }