CakePHP Search between 2 Date Records

后端 未结 6 1899
再見小時候
再見小時候 2020-12-11 10:20

I am building a small Web App that lets users reserve Office Rooms and Equipment. For the Reservation they enter a Start and an End Date.

When a user tries to find o

6条回答
  •  天涯浪人
    2020-12-11 10:59

    There is a simpler solution to this, but thanks for the help:

    (As a condition in the find:)

    array('Equipment.date_start <= ' => $date,
          'Equipment.date_end >= ' => $date
         ),
    

提交回复
热议问题