jschlies's avatar

whereIn - list of strings

The following is failing where $x is a comma delimited list of strings

$DomboEmailsQuery->whereIn('template', explode(',', $x));

The resulting query is not 'quoting' the strings.

Jim

0 likes
3 replies
jschlies's avatar

My work-around is $DomboEmailsQuery->whereIn('template', array_map( function ($a) { return '''.$a . '''; }, explode(',', $x) ) );

jschlies's avatar

I get the same here $DomboEmailsQuery->where('template_time', '>='$date_in_mm_yy_dd_format);

Please or to participate in this conversation.