how can i select all records from a table where a future date column is less than 14 days away within a php table.

somthing similar to?

SELECT DISTINCT FROM table WHERE 'Date_Column' <14 days

Thanx In Advance
KeeF

Recommended Answers

All 2 Replies

SELECT DISTINCT * FROM table WHERE date_add(`Date_Column`, interval 14 day) < now()

SELECT DISTINCT * FROM table WHERE date_add(`Date_Column`, interval 14 day) < now()

works a treat!! Many thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.