I have a query for getting today's records from table. I have inserted the date field by using now()
.
select u.*,p.* from user_brands as u inner join products as p where u.parent_id = p.cat_id and date_format( p.date, '%Y-%m-%d' ) = curdate( )
By using this query every first time I am getting empty results, once if I refresh the page I am getting the results. Why is it not returning values for the first time?