I have 2 table like this-
panelists
users
I have a Laravel 5.1 query builder like this-
$baseQuery = DB::table('panelists')
->join('users', 'panelists.user_id', '=', 'users.id')
->select(
'users.id',
'users.name',
'users.email',
'IF(enabled=1,"English Book","Other Language") AS status'
)
->where('panelists.customer_id', '=', $user_ID);
But it is giving me error for
'IF(enabled=1,"English Book","Other Language") AS status'
Can anyone help please?
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1PGNpKe
via IFTTT
Aucun commentaire:
Enregistrer un commentaire