Yes, all you would need to do is add the appropriate join(s) to the query from one of the server side examples: http://datatables.net/development/server-side
Yea I think I need to do join, am I allowed to change $sWhere variable as it is set on "" . And I would like to put my join part here. Or I need to put join part in $sTable variable?
Replies
http://datatables.net/development/server-side/php_mysql
starting at line 123:
[code]
$sQuery = "
SELECT SQL_CALC_FOUND_ROWS ".str_replace(" , ", " ", implode(", ", $aColumns))."
FROM $sTable
$sWhere
$sOrder
$sLimit
";
[/code]
and change it to something like:
[code]
$sJoin = ' JOIN myable on mytable.id = myothertable.id ';
$sQuery = "
SELECT SQL_CALC_FOUND_ROWS ".str_replace(" , ", " ", implode(", ", $aColumns))."
FROM $sTable
$sJoin
$sWhere
$sOrder
$sLimit
";
[/code]