-->where ...where exactly?
-->where ...where exactly?
Hi Allan,.. hi fellow DataTables users
I used the generator on the Editor website to generate a scaffold for my crud table.
Now i need to limit the result set of the table to show only the rows
e.g.: "where owner = '$logged_in_user'" ..
I did some research in the Forum and some people are using a -->where function which
somehow places a where in the sql string.
Could somebody please shed light on where (in which file?) this:
(snippet found in query.php)
$query
->where( 'name', 'allan' )
->where( function ($q) {
$q->where( 'location', 'Scotland' );
$q->where( 'location', 'Canada' );
} );
can be inserted? it looks like PHP ..
Thanks in advance
Martin
I used the generator on the Editor website to generate a scaffold for my crud table.
Now i need to limit the result set of the table to show only the rows
e.g.: "where owner = '$logged_in_user'" ..
I did some research in the Forum and some people are using a -->where function which
somehow places a where in the sql string.
Could somebody please shed light on where (in which file?) this:
(snippet found in query.php)
$query
->where( 'name', 'allan' )
->where( function ($q) {
$q->where( 'location', 'Scotland' );
$q->where( 'location', 'Canada' );
} );
can be inserted? it looks like PHP ..
Thanks in advance
Martin
This discussion has been closed.
Replies
Regards,
Allan
works perfectly..