fetchObject(); if ($exist_id){ if ($exist_id->id) { if ($exist_id->id < 1) { drupal_set_message('You need to propose a flowsheet Flowsheet Proposal or if you have already proposed then your flowsheet is under reviewing process', 'status'); return ''; } //$exist_id->id < 3 else { $search_rows = array(); global $output; $output = ''; $query3 = db_query("SELECT id,project_guide_name,project_guide_university,project_title FROM om_pssp_proposal WHERE project_guide_name != '' AND project_guide_university != '' AND approval_status=3"); $i = 1; while ($search_data3 = $query3->fetchObject()) { $search_rows[] = array( $i, $search_data3->project_title, $search_data3->project_guide_name, l('Download Certificate', 'powersystems/pssp/certificates-custom/pdf/' . $search_data3->id) ); $i++; //$search_data3->id } //$search_data3 = $query3->fetchObject() if ($search_rows) { $search_header = array( 'No', 'Project Title', 'Project Guide Name', 'Download Certificates' ); $output = theme('table', array( 'header' => $search_header, 'rows' => $search_rows )); return $output; } //$search_rows else { echo ("Error"); return ''; } } } } //$exist_id->id else { drupal_set_message('You need to propose a flowsheet Flowsheet Proposal or if you have already proposed then your flowsheet is under reviewing process', 'status'); $page_content = " No certificate available "; return $page_content; } }