WHERE `email` LIKE '%me%' OR `name` LIKE '%me%'
Try something like this….
I use Bootstrap tables and feed it data using a class, but at the end of the day the query is like this.
$rows=$db->exec("SELECT fileID,fileName,fileSize,fileType,fileTag FROM fileDetailsView $sWhere $sOrder $sLimit");
And to build sort I use something like this:
if ( isset($this->sort) )
{
$sOrder = "ORDER BY $this->sort $this->order";
}
And for pagination I use something like this:
if( isset( $this->offset ))
{
$sLimit = "LIMIT ".intval( $this->offset ).", ".
intval( $this->limit );
}
$me = "%ikkez%";
$mapper->paginate(0,10, ['email LIKE :me1 or name LIKE :me2', ':me1'=>$me, ':me2'=>$me]);
['email LIKE ? or name LIKE ?', $me, $me]