I need to know how to set ad listings to expire 30 days in php mysql?
i know i have to ad some kind of feids in the myql table of listings
here is my php code to the page where it displays the for sale listings and catagories
[php]
Category : <? echo "$category";?> <? $query = "SELECT COUNT(*) FROM forsale_content WHERE category='$category' AND status='online'"; $numentries = mysql_query($query) or die("Select Failed!"); $numentry = mysql_fetch_array($numentries); ?>
here is the mysql table for the listing content
[embed=425,349]CREATE TABLE IF NOT EXISTS forsale_content
(
id
int(11) NOT NULL AUTO_INCREMENT,
postdate
date DEFAULT NULL,
posttime
varchar(10) DEFAULT NULL,
name
varchar(250) DEFAULT NULL,
phone
varchar(250) DEFAULT NULL,
address
varchar(250) DEFAULT NULL,
city
varchar(255) DEFAULT NULL,
country
varchar(250) DEFAULT NULL,
email
varchar(250) DEFAULT NULL,
website
varchar(250) DEFAULT NULL,
title
varchar(250) DEFAULT NULL,
price
varchar(250) DEFAULT NULL,
description
text,
category
varchar(250) DEFAULT NULL,
photo
varchar(250) DEFAULT NULL,
status
varchar(250) DEFAULT NULL,
password
varchar(25) DEFAULT NULL,
PRIMARY KEY (id
)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=46 ;[/embed]