I, have a this code in controller:
$id = Input::get('pole');//input array like '1','3','4'
$st = implode("|", $id);
$data = Inat::latest('created_at')
->whereRaw("CONCAT(',', `t01_field`, ',') REGEXP BINARY ',(?),'",$st)->get();
it's not working, but this line is working perfectly: ->whereRaw("CONCAT(',',t01_field, ',') REGEXP BINARY ',(1|2|3),'")->get(); I think, problem because variable $st is a string, but how to convert same format 1|2|3
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2ksCQDW
via IFTTT
Aucun commentaire:
Enregistrer un commentaire