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
]);
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire