require_once("dbcontroller.php");
include('watermark1.php');
$number = $_COOKIE["user"];
$db_handle = new DBController();
$result = $db_handle->runQuery("SELECT Employee_number,date_start,date_end,Days_taken,Sick,Study,Annual,compassionate_leave,Other,Details,Status,approved_by FROM leave_management WHERE Employee_Number='$number'");
The problem is here because i dont know how to write the code to only get the headers of the selected query from above and instead it pulls all the headers from the table instead of only the selected column headers. any hint on how to amend the $header code ?
$header = $db_handle->runQuery("SELECT `COLUMN_NAME`
FROM `INFORMATION_SCHEMA`.`COLUMNS`
WHERE `TABLE_SCHEMA`='Namtax'
AND `TABLE_NAME`='leave_management'");