Not sure how to pass the where clause criteria to the DATATABLE from php
Not sure how to pass the where clause criteria to the DATATABLE from php
shanplannet
Posts: 1Questions: 0Answers: 0
Here is what I changed the original server_processing.php downloaded.
$sWhere = "WHERE role_id=".$roleID."'";
if ( isset($_GET['sSearch']) && $_GET['sSearch'] != "" )
{
$sWhere = "WHERE (";
for ( $i=0 ; $i Original code
//Shan added here
$sWhere .= ') AND role_id='.$roleID;
}
But I am getting ......Undefined variable: roleID in the Chrome error console.....$roleID is not an $_GET or $_POST attribute, but it is a custom attribute on the my PHP (for example table.php) where I have the datatable is getting initialized.
Any help
$sWhere = "WHERE role_id=".$roleID."'";
if ( isset($_GET['sSearch']) && $_GET['sSearch'] != "" )
{
$sWhere = "WHERE (";
for ( $i=0 ; $i Original code
//Shan added here
$sWhere .= ') AND role_id='.$roleID;
}
But I am getting ......Undefined variable: roleID in the Chrome error console.....$roleID is not an $_GET or $_POST attribute, but it is a custom attribute on the my PHP (for example table.php) where I have the datatable is getting initialized.
Any help
This discussion has been closed.