Generally exclude rows in server sided script
Generally exclude rows in server sided script
Hi,
I have a mysql database which contains adresses. These Adresses have a data field "type" which specfies to whom the address is visible.
How can I change the server sided php script from the datatable example to have a general additional WHERE type='xxx' to get only the addresses which are applied to the user?
Thanks
Claus
I have a mysql database which contains adresses. These Adresses have a data field "type" which specfies to whom the address is visible.
How can I change the server sided php script from the datatable example to have a general additional WHERE type='xxx' to get only the addresses which are applied to the user?
Thanks
Claus
This discussion has been closed.
Replies
Assuming the script is this one ( http://datatables.net/development/server-side/php_mysql ), I would normally add a little bit around line 131:
[code]
if ( $where ) {
$where .= ' AND type = xxx';
}
else {
$where = 'WHERE type = xxx';
}
[/code]
Regards,
Allan
Claus
Allan