add super WHERE clause and problem with bSearchable
add super WHERE clause and problem with bSearchable
I try to add WHERE clause form all showing rows and edit php file for server-side.
[code]
session_start();
...
/*
* Filtering
* NOTE this does not match the built-in DataTables filtering which does it
* word by word on any field. It's possible to do here, but concerned about efficiency
* on very large tables, and MySQL's regex functionality is very limited
*/
$user=$_SESSION['user_id'];
$sWhere = "WHERE ko='$user'";
if ( $_GET['sSearch'] != "" )
{
$sWhere = "WHERE (ko='$user' AND ";
for ( $i=0 ; $i
[code]
session_start();
...
/*
* Filtering
* NOTE this does not match the built-in DataTables filtering which does it
* word by word on any field. It's possible to do here, but concerned about efficiency
* on very large tables, and MySQL's regex functionality is very limited
*/
$user=$_SESSION['user_id'];
$sWhere = "WHERE ko='$user'";
if ( $_GET['sSearch'] != "" )
{
$sWhere = "WHERE (ko='$user' AND ";
for ( $i=0 ; $i
This discussion has been closed.
Replies
I using the server-side (php + mysql) datatable and trying to add the where statement.
Did you solve your post ?
I answered a similar post a while ago.
Here is what I use in this scenario and it works very well.
Here is my code:
[code]
$sWhere = "";
if ( $_GET['sSearch'] != "" )
{
$sWhere = "WHERE (";
for ( $i=0 ; $i
I also tryied and this code. It works but the same problem "search results" - i posted in another discusion.