Page 2 of 2
Re: How do you calculate today's date - minus a db Date Entry?
Posted: Fri Oct 02, 2009 12:09 pm
by simonmlewis
the error ONLY occurs when this is in place
Code: Select all
$result = ($thedate - $addedDays);
Without that, and with the other stuff, even the IF statement on the $result, it won't error at all.
This makes it error.
Re: How do you calculate today's date - minus a db Date Entry?
Posted: Fri Oct 02, 2009 12:21 pm
by Mirge
In the code you posted earlier, it shows as: $resulta = ($thedate - $datesubmitted);
If you're using $result = ($thedate - $datesubmitted)... make sure you're not still using $result in a mysql_fetch_* function, as.. as the error says, is not a valid mysql result.....it's just a string, number, whatever now. I'd recommend not mixing up your variables like that... change $result to something else for your ($thedate - $datesubmitted) value.
Re: How do you calculate today's date - minus a db Date Entry?
Posted: Fri Oct 02, 2009 12:31 pm
by simonmlewis
Yes - about 30 seconds ago it just clicked here too - $result - is the entire cause to the problem.
I changed it and it works.
Re: How do you calculate today's date - minus a db Date Entry?
Posted: Fri Oct 02, 2009 12:32 pm
by Mirge
simonmlewis wrote:Yes - about 30 seconds ago it just clicked here too - $result - is the entire cause to the problem.
I changed it and it works.
lol... don't ya hate that.
Glad ya got it resolved though.