What's wrong with this SQL statement?:
I want to select records that have field createdBy equal to Dave and field createdOn equal to today's date. :confused:Code:SELECT * FROM vbsPosts WHERE createdBy='Dave' AND createdOn = CURDATE()
Printable View
What's wrong with this SQL statement?:
I want to select records that have field createdBy equal to Dave and field createdOn equal to today's date. :confused:Code:SELECT * FROM vbsPosts WHERE createdBy='Dave' AND createdOn = CURDATE()
Almost have it working with this:
Code:SELECT * FROM vbsPosts WHERE createdBy='Dave' AND DATE_FORMAT(createdOn, '%Y-%m-%d') = CURDATE()
Correction, it's working now with the above code.