mercredi 28 septembre 2016

where and and or in clouse in laravel

i am trying to get result from table with multiple and/and clusese My sql statement is

SELECT * FROM tbl1
WHERE Id = 46
AND
t_Id = 2
AND
(Cab = 2 and Cab = 4)

i am using this

$busincidentEntryLists = User::Select('users.*')
->join('table2', 'users.id', '=', 'table2.studentId')


->where('table2.classId','=',$ClassID)
   ->where('table2.studentSection','=',$SecID)
    ->whereDay('table2.EnrolmentDate','<=',$takenDay)
    ->whereMonth('table2.EnrolmentDate','<=',$takenMonth)
    ->whereYear('table2.EnrolmentDate','<=',$takenYear)

please help me

thanks



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire