I have a table attendacein which there is a different date. Now I want to get traffic for the last record of the previous month. I used this:
$attt = Attendance::find()
->select('daytime')
->orderBy(['daytime' => SORT_DESC])
->one();
to get the last record of the previous month, but she does not give me the last record of the previous month. My table
source
share