Counting by months not days
Posted: Sat Oct 27, 2007 11:20 am
I have a script that i want to alter to count how many months old something is rather than days, at the moment its going by days old > 6 rather than months.. this is what i got but i dont know how to alter it :
Could some one help me with this please
thankyou.
Code: Select all
<?
//get last event date and now date
$GetDate = mysql_query("SELECT DATEDIFF(NOW(), FieldUpdate) AS MonthsOld FROM countries
WHERE CountryID='1'")
or die(mysql_error());
$monthsoldrow = mysql_fetch_assoc($GetDate);
//if its been 6 months echo the secret button
If ($monthsoldrow >6){
Echo'
<input type="submit" id="Button1" name="Button1" value="Update" style="position:absolute;left:667px;top:180px;width:75px;height:24px;z-index:20">
';
}
?>