$no_days = "(TO_DAYS(dateadded)-TO_DAYS(Now())>=-$newdateadded)";Without running any code, it appears to me that you have a "units" problem. dateadded and Now are transformed by the TO_DAYS function but their difference is being compared to $newdateadded. Why doesn't TO_DAYS() apply to all 3 terms? Aside from that, this is string, why not:
Put your code in a program and run it!
In reply to Re: Valid code?
by Marshall
in thread Valid code?
by htmanning
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |