php - get Date range when there are no date exists in table -


this query it's working fine.

but want blank record missing date, when there no record exist date range, while fetching data table.

select * tbl_social `dcreateddate` between  date_add('2015-07-06', interval 3 day) , date_sub('2015-07-06', interval 3 day); 

enter image description here

if there no record date '2015-07-08' need date row in listing.

thanking you.

you can make changes query , bring data not in particular range

and has no date . try

select * select * tbl_social  (             `dcreateddate` not between date_sub('2015-07-06', interval 3 day)               , date_add('2015-07-06', interval 3 day)       ) or  (`dcreateddate` null ) 

with not between seek records dont fit criteria , null see records dcreateddate blank , fetch data matching both criteria


Comments

Popular posts from this blog

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

StringGrid issue in Delphi XE8 firemonkey mobile app -