Mark Tabor

Mark Tabor

  • 548
  • 2k
  • 460.4k

Mysql query return wrong result set

Sep 6 2018 1:36 AM
I have mysql database in which i have a datetime column i am saving date in format  date("Y-m-d")
 
but my below query 
 
"SELECT aid,glid FROM plan_vdetails WHERE location=16 and vdate2 between '2018-09-05' and '2018-09-05' group by aid,glid" 
 
Return result of Month=05 as well no matter here i am giving it year 2018, month =09 and day = 05 ,
 
can some body help me  

Answers (3)