How to change the output before it gets to the table displayed
How to change the output before it gets to the table displayed
Gazzooks
Posts: 1Questions: 0Answers: 0
I am using this method Link: http://www.datatables.net/release-datatables/examples/server_side/server_side.html
to grab my data from a mysql DB/table using php and bootstrap.
All works flawlessly.
My question is how do I change the value drawn from the DB before it is displayed in my html table page:
The Second column [1] is the column that is an enum field with a 'q' or an 'c', I want to change it to a word that corresponds to the letter. 'q' to "Quiz" and 'c' to "Camp".
I am pretty sure it is can be done in here:
[code]/*
* Output
*/
$output = array(
"sEcho" => intval($_GET['sEcho']),
"iTotalRecords" => $iTotal,
"iTotalDisplayRecords" => $iFilteredTotal,
"aaData" => array()
);
while ( $aRow = mysql_fetch_array( $rResult ) )
{
$row = array();
for ( $i=0 ; $i
to grab my data from a mysql DB/table using php and bootstrap.
All works flawlessly.
My question is how do I change the value drawn from the DB before it is displayed in my html table page:
The Second column [1] is the column that is an enum field with a 'q' or an 'c', I want to change it to a word that corresponds to the letter. 'q' to "Quiz" and 'c' to "Camp".
I am pretty sure it is can be done in here:
[code]/*
* Output
*/
$output = array(
"sEcho" => intval($_GET['sEcho']),
"iTotalRecords" => $iTotal,
"iTotalDisplayRecords" => $iFilteredTotal,
"aaData" => array()
);
while ( $aRow = mysql_fetch_array( $rResult ) )
{
$row = array();
for ( $i=0 ; $i
This discussion has been closed.
Replies
Allan