Pull mysql data between 2 dates : I have searched this site for what i need but i coulldnt find anything to my specific. I have a slight difficulty about pulling data between two dates from mysql. I know the system how to write the code to filter data between two dates but the issue i am having is these two dates are in different months. Let me explain further;

For example I need to pull the data between 25 January - and 24 February. So ideally i can set these dates manually but i need them to be set automatically according to the current time stamp. today is 7th January and the start date should be 25 December and end date should be 24 January and so on. So once we reach 25th Januray and date should be set to 24th of February.

Currently i have the following code and i set them manually.

    <?php 
				
		$from = strtotime('25/12/2019 00:00');
		$till = strtotime('24/01/2020 23:59');
					
		$stmt = $con -> prepare("SELECT SUM(`amount`) as `total` FROM `income` WHERE user_id = ? && time >= ? && time <= ?"); 
		$stmt -> bind_param('iii', $user_id, $from, $till); 
		$stmt -> execute(); 
		$stmt -> store_result(); 
		$stmt -> bind_result($total_income); 
		$stmt -> fetch();
				
	?>

So is there any way to set these dates automatically according to the current time?
 