I am using ?
identifier for my DB::insert()
and its working great, but I am having problem for my DB::select()
, the ?
doesn't work.
Here's my query:
$result = DB::select("
SELECT `department_code`, `name` FROM `tbl_departments`
WHERE `department_code` LIKE '%?%' OR `name` LIKE '%?%'
", [
$searchkey, $searchkey
]);
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2s8Ii0w
via IFTTT
Aucun commentaire:
Enregistrer un commentaire