I am generating a report from mysql for the following three conditions..
1) records for the last two days.
2) records for the first fifteen days of the current month
3) records for the last fifteen days of the current month
//
$sql_last_two_days="select date_field ,count(field2) from tbl_name where date_field >= substring( DATE_SUB( CURRENT_DATE( ) , INTERVAL 1 DAY ) , 1, 10 ) GROUP BY date_field";
// for first fifteen
$sql_first_fifteen="select count(field1),count(field2) from tbl_name where date_field between '$cur_string_1' and '$cur_string_15'";
so in principle, I have three queries and three record sets.. wondering if there is any way to optimize and bring them together possibly in a single query without any change in load time??