Thanks hozawa, i read the documentation and tried this code
$P!{Query}
the default value of the parameter is
SELECT date_format(a.application_date,'%d-%m-%Y'),concat(ifnull(a.present_address,""),', ')," +
"concat(ifnull(a.present_village,""),', '),concat(ifnull(a.present_post,""),', ')," +
"concat(ifnull(a.present_ps,""),', '),concat(ifnull(a.present_dist,""),', ')," +
"concat(ifnull(a.present_pin,""),', '),concat(ifnull(a.present_landline_no,"none"),', ')," +
"concat(ifnull(a.present_mobile,"none"),''),concat(ifnull(a.permanent_address,""),', ')," +
"concat(ifnull(a.permanent_village,""),', '),concat(ifnull(a.permanent_post,""),', ')," +
"concat(ifnull(a.permanent_ps,""),', '),concat(ifnull(a.permanent_dist,""),', ')," +
"concat(ifnull(a.permanent_pin,""),', '),concat(ifnull(a.permanent_landline_no,"none"),', ')," +
"concat(ifnull(a.permanent_mobile,"none"),''),b.`school_name`,b.`school_address_1`,b.`school_address_2`," +
"b.`school_address_3`,a.`admission_no`,a.`academic_year`,a.`form_no`,a.`admission_class`,a.`student_name`," +
"a.`dob_day`,a.`dob_day`,a.`dob_month`,a.`dob_year`,a.`dob_words`,a.`age`,a.`nationality`,a.`religion`," +
"a.`mother_tongue`,a.`gender`,a.`category_abbr`,a.`prev_school`,a.`prev_result`,a.`prev_rank`," +
"a.`prev_mark_pc`,a.`blood_group`,a.`mother_name`,a.`father_name`,a.`guardian_name` " +
"FROM `application_form` a,`config` b, class c " +
"WHERE b.config_id = 1 " +
"GROUP BY admission_class,form_no " +
"ORDER BY admission_class ASC
and I want to send
SELECT date_format(a.application_date,'%d-%m-%Y'),concat(ifnull(a.present_address,""),', ')," +
"concat(ifnull(a.present_village,""),', '),concat(ifnull(a.present_post,""),', ')," +
"concat(ifnull(a.present_ps,""),', '),concat(ifnull(a.present_dist,""),', ')," +
"concat(ifnull(a.present_pin,""),', '),concat(ifnull(a.present_landline_no,"none"),', ')," +
"concat(ifnull(a.present_mobile,"none"),''),concat(ifnull(a.permanent_address,""),', ')," +
"concat(ifnull(a.permanent_village,""),', '),concat(ifnull(a.permanent_post,""),', ')," +
"concat(ifnull(a.permanent_ps,""),', '),concat(ifnull(a.permanent_dist,""),', ')," +
"concat(ifnull(a.permanent_pin,""),', '),concat(ifnull(a.permanent_landline_no,"none"),', ')," +
"concat(ifnull(a.permanent_mobile,"none"),''),b.`school_name`,b.`school_address_1`,b.`school_address_2`," +
"b.`school_address_3`,a.`admission_no`,a.`academic_year`,a.`form_no`,a.`admission_class`,a.`student_name`," +
"a.`dob_day`,a.`dob_day`,a.`dob_month`,a.`dob_year`,a.`dob_words`,a.`age`,a.`nationality`,a.`religion`," +
"a.`mother_tongue`,a.`gender`,a.`category_abbr`,a.`prev_school`,a.`prev_result`,a.`prev_rank`," +
"a.`prev_mark_pc`,a.`blood_group`,a.`mother_name`,a.`father_name`,a.`guardian_name` " +
"FROM `application_form` a,`config` b, class c " +
"WHERE b.config_id = 1 and c.class_id=6 and a.admission_class=c.class_desc " +
"GROUP BY admission_class,form_no " +
"ORDER BY admission_class ASC