How to get 2 fields in ssp class ?
How to get 2 fields in ssp class ?

Hi,
I am using ssp class to get the data using json etc. and it works fine. I have a tiny problem as to how to get 2 fields in 1 array in the ssp file. For example:
array(
'db' => 'prod_status',
'dt' => 8,
'formatter' => function( $d, $row ) {
if($d == 0) { return "Invisible"; } else { return "Visible"; }
}
),
As you can see i am only able to get the prod_status field's data in that, I want to get another fields data say: prod_id also in it. What I have to do to get both prod_id and prod_status in that ?
Thanks.
This discussion has been closed.
Answers
Do you mean that you want to access
prod_id
in theformatter
function? If yes, you can access it using$row
variable, for example$row['prod_id']
. If no, please explain.If you want to return
prod_id
in the response, then just include the following definition.See more articles about jQuery DataTables on gyrocode.com.