Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Retrieving dates that fall within two specified dates

Tags:

php

mysql

I am storing the start and end date of a users holiday period in a MySQL table.

I need to enable the ability for administrators to run reports where they specify two dates and all users who's start date or end date fall in between the two specified dates are retrieved from the database.

Has anyone done anything similar, or know of a good method of doing this?

like image 517
JHamill Avatar asked Dec 01 '25 14:12

JHamill


1 Answers

use mysql's between operator

like image 103
Galen Avatar answered Dec 03 '25 03:12

Galen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!