Hi, I'm trying to create a 'select' statement that picks a date from a database that is 358 days old - does anyone have an idea how to do this?
I have a table called invoice with the following fields
id(int, auto increment), due(DATE), email(varchar), company(varchar), name(varchar), cost(decimal 10,2)
the statement I have so far is:
$query = "SELECT price, due, email, company, name FROM invoice WHERE due="; // selecting information from db
$result = mysql_query($query); // getting the results of the query
if (!$result) {
echo 'could not run query: ' . mysql_error();
exit;
}
and I'm just not sure what the proper way of writing it is, any help would be greatly appreciated.