balkan7 Posted December 13, 2006 Share Posted December 13, 2006 hi i need help for create code after 30 days update ?base.sql[code]CREATE TABLE `bsoft_catalog` ( `ID` int(10) NOT NULL auto_increment, `Name` varchar(255) NOT NULL default '', `Desc` text NOT NULL, `Price` float(10,2) NOT NULL default '0.00', `Image` text NOT NULL, `Category` int(10) NOT NULL default '0', `Cd` int(10) NOT NULL default '0', `New` varchar(50) NOT NULL default '', `Date` date NOT NULL default '0000-00-00', PRIMARY KEY (`ID`), UNIQUE KEY `Name` (`Name`)) ENGINE=MyISAM AUTO_INCREMENT=19 DEFAULT CHARSET=latin1 AUTO_INCREMENT=19 ;[/code]and php code is:[code]<?php$q1 = "select * from bsoft_catalog New = 1";$r1 = mysql_query($q1) or die(mysql_error());$a1 = mysql_fetch_array($r1);// check in datebase if value=1 show picture, if 0 nothing for showif ($a1[New] == 1) { echo "<img src=\"images/new.gif\" />"; } ?>[/code]so now i need code for after 30 days update in colum New value=0. Quote Link to comment Share on other sites More sharing options...
simcoweb Posted December 13, 2006 Share Posted December 13, 2006 Just have the script run every 30 days as a cron job. Quote Link to comment Share on other sites More sharing options...
balkan7 Posted December 13, 2006 Author Share Posted December 13, 2006 if you have code please paste here... Quote Link to comment Share on other sites More sharing options...
balkan7 Posted December 13, 2006 Author Share Posted December 13, 2006 soryy for replay but i need this !can someone create code for 30 days update in column new query ? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.