Jump to content

Pulling row that are at least 30 days old


dadamssg87

Recommended Posts

I have a "created" column in my table that uses CURRENT_TIMESTAMP. Can somebody help me write a query that pulls rows that are at least 30 days old?

<?php

$query = "SELECT * FROM Accounts where DateDiff(day,date(created),curdate()) > 30";
?>

 

I get this error with the above. #1582 - Incorrect parameter count in the call to native function 'DateDiff'

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.