How can i use LIKE
operator in this sql statement using medoo framework?
Original SQL statement:
SELECT id,name FROM table WHERE name LIKE %'foo'%
medoo statement:
$data=$db->select('table',
['id','name'],
['AND' => ['name' => 'foo']
]
);
thanks for your help!
Use like condition like this [~]
Refer the link
$data=$db->select('table',
['id','name'],
['AND' => ['name[~]' => 'foo']
]);