-3

I want to fetch records from the DB from one date to the second I have to fetch records but it's not giving me a record of the last date.

$query =  "SELECT `date_of_info_added` , `sub_source` FROM `jcontacts` where date_of_info_added  >= $month and date_of_info_added <= $end ORDER BY date_of_info_added DESC";
Jonas
  • 121,568
  • 97
  • 310
  • 388

1 Answers1

0

Can you try this... use between.

$query = "SELECT date_of_info_added , sub_source FROM jcontacts WHERE date_of_info_added BETWEEN '$month' AND '$end' ORDER BY date_of_info_added DESC"
Rain Lai
  • 9
  • 1
  • 3