I have a table like this-
webinars
I want to have a query in Laravel Query Builder like this-
// Base Quary
$baseQuery = DB::table('webinars')
//->join('users', 'panelists.user_id', '=', 'users.id')
->select(
'id',
'title',
'description',
'hosts',
DB::raw('concat(starts_on, ' ', timezone) as starts'),
'duration',
'created_at'
)
->where('user_id', '=', $user_ID);
And getting error for-
DB::raw('concat(starts_on, ' ', timezone) as starts')
I need it because I want something like =>
today JPN
if starts_on=today and timezone='JPN'
Can anyone pleae help?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire