How to show data from second table that has todays date only

  date, mysql, php

I have a left join between 2 tables, tables birds and table Weights.

In my php table it displays fields from table 1 such as id, name, species, bird type, minimum flying weight and maximum flying weight.
In table 2 I show the field weight.

When a weight is entered on another page it has a date stamp, I’m trying to get the table to show only the weight entered on todays date to show, at the moment its showing all that have been entered.

How can I get it to only show the weight relevant to todays date. Heres my mysql query

SELECT * FROM birds
LEFT JOIN Weights
ON birds.id = Weights.BirdId 
WHERE FlyingBird = 'Yes' OR Weights.Date = curdate() 
ORDER BY AnimalType, Name

Source: Ask PHP

LEAVE A COMMENT