izniburak/pdox

I need a help Bro

tonmooy opened this issue · 2 comments

Hello bro Suppose i have video_cat id = 19, 20, 22, 21

.now how can i show or list multiple video category item inside $records array from allvideos table
$where = [
'video_cat' => 19,
'status' => 1,

		];

$where = [
'video_cat' => 21,
'status' => 1,

		];

$records = $db->table('allvideos')
->select('*')
->orderBy('id', 'DESC')
->where($where)

			->getAll();

Thanks in advance

Hi @tonmooy ,
Can you try this?

$videoCats = [19, 20, 21, 22];
$records = $db->table('allvideos')->where('status', 1)->in('video_cat', $videoCats)->orderBy('id', 'DESC')->getAll();

Hi @tonmooy ,
Can you try this?

$videoCats = [19, 20, 21, 22];
$records = $db->table('allvideos')->where('status', 1)->in('video_cat', $videoCats)->orderBy('id', 'DESC')->getAll();

Thanks bro You are helpfull