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. Link to comment https://forums.phpfreaks.com/topic/30506-after-30-days-update/ 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. Link to comment https://forums.phpfreaks.com/topic/30506-after-30-days-update/#findComment-140426 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... Link to comment https://forums.phpfreaks.com/topic/30506-after-30-days-update/#findComment-140434 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 ? Link to comment https://forums.phpfreaks.com/topic/30506-after-30-days-update/#findComment-140557 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.