date counting/subtracting MySQL and PHP

From: Date: Tue, 21 Oct 2003 20:32:51 +0000
Subject: date counting/subtracting MySQL and PHP
Groups: php.general 
Request: Send a blank email to php-general+get-166836@lists.php.net to get a copy of this message
Hello, Can some lend advice regarding date functions using mysql and php please? I have a table set up like so (DESCRIBE nuke.position) hiddenid int(5) PRI NULL auto_increment id varchar(40) contact_email varchar(64) title varchar(60) salary mediumtext discipline mediumtext sector mediumtext description mediumtext location mediumtext posted timestamp(14) YES NULL /* date posted */ days_to_expire int(4) YES 30 /* total days valid */ contact varchar(40) tax_term mediumtext job_id varchar(40) city varchar(60) state varchar(60) country varchar(60) logo varchar(128) YES NULL I need to get mysql or php to subtract the current date from $date_posted(time stamp) and return the number of days(the item has been posted) as a sum. Any suggestions would be greatly appreciated! Paul

« previous php.general (#166836) next »