Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel How can I escase string in whereRaw

$query->whereRaw( 'item.day ' . $sign . ' ?', [$filter_day]);



if (in_array($sign, ['=', '<', '>', '<=', '>=', '!=', '<>'])) {
    $query->whereRaw( 'item.day ' . $sign . ' ?', [$filter_day]);
}
 
PREVIOUS NEXT
Tagged: #laravel #How #I #escase #string #whereRaw
ADD COMMENT
Topic
Name
6+7 =