Hi All, I am new in PHP and MySQL. As of now i am building a web application , where i have to get the list of all those clients whose date of joining - current date equals to 30. I have a table in database where there is a field fld_DOJ where i am saving date like this (2017/7/21). I simply want a query like this SELECT name FROM table WHERE ( SELECT fld_DOJ - current date = 30). I appreciate your response.

Guys please help me i dont know it is right or wrong.

My problem is solved thanks to DaniWeb Community !

SELECT * FROM tbl_book WHERE DATEDIFF(CURDATE(),fld_uploadedon) = 29
This query working fine

Member Avatar

Use a standard format for date YYYY-MM-DD