| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| NamePros Regular Join Date: Dec 2006
Posts: 236
![]() | |
| | |
| | #2 (permalink) |
| NamePros Member Join Date: Nov 2009
Posts: 142
![]() ![]() | $temp = strtotime($timestamp)/86400; $numMYSQL = Number of Days in MySQL; if ($temp - $numMYSQL < 1) { //today } else { // not today } something along those lines anyway coz i didnt rly understand what you need
__________________ Scientific Calculator - SciCalculator.com Dns For Sale: Fuelcooler/s(.dot)com - RuralRiding(.dot)com - AttackTank(.dot)com - Foredoomed(.dot)com - SavingCalories(.dot)com - FairDealFinder(.dot)com |
| | |
| | #3 (permalink) |
| Domains my Dominion Join Date: Aug 2005 Location: Web 1.0
Posts: 9,963
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Something like this: Code: UPDATE [table] SET status=3 WHERE DATE_ADD([Timestamp column],INTERVAL [number of days] DAY) >= CURDATE() AND status=0
__________________ NameNewsletter.com - free lists of available domain names ZoneFiles.net (beta) - ccTLD and gTLD droplists |
| | |
| | THREAD STARTER #4 (permalink) |
| NamePros Regular Join Date: Dec 2006
Posts: 236
![]() | Thanks for your replies. They helped me find the right code. ![]() Code: $temp = strtotime($timestamp. "+$days days")/86400;
$temp2 = time();
$temp2 = ($temp2)/86400;
if ($temp - $temp2 < 1) {
mysql_query("UPDATE Ads1 SET Status ='3' WHERE ID = '$id' AND Status = '0'");
} |
| | |
| | #5 (permalink) |
| NamePros Member Join Date: Nov 2009
Posts: 142
![]() ![]() | no probs knew it was something along those lines you needed cheers
__________________ Scientific Calculator - SciCalculator.com Dns For Sale: Fuelcooler/s(.dot)com - RuralRiding(.dot)com - AttackTank(.dot)com - Foredoomed(.dot)com - SavingCalories(.dot)com - FairDealFinder(.dot)com |
| | |