Originally Posted by LearningCoder
Instead of using NOW() to insert a date into the database, try creating a PHP timestamp, format it as you need it then try inserting the variable.
In my PHP book, it shows in one example to insert using now() but when I tried it, it didn't work. Soon as I created a php timestamp, it worked.
Just a thought.
Also, what is different in this script to your last script?
Not much is different. The $subcategory variable was added in this script, and this one is all php. The original was almost entirely static data and so I didn't need the entire page in php tags. Like I said, its almost exactly the same. As for your timestamp trick, nothing...
Originally Posted by AndrewGSW
Just eliminating obvious things:
If the 'date' field is a time-stamp field that it doesn't require assigning NOW().
You haven't just omitted the final closing bracket } ?
Nope, all brackets are properly closed... and no the 'date' field is a datetime, kinda need it to be in order to work properly with an 'agoTime()' function.