I recieve the error: Out of range value adjusted for column 'last_active' at row 1
last_active is a mediumint(12). I've even tried it as an unsigned field, but it won't work. The value I'm trying to insert is simply the result from time();
Just as an FYI, if $this->time is an INT (which I assume, since it's the return of PHP
s time() function), don't wrap it in quotes. The same goes for the value '29' in your query. If an INT or FLOAT type is going into one of those types of columns, leave off the quote; if it's supposed to be a string literal, wrap it.
You might want to look at the actual value of $this->time just in case.
Actually I think the problem was the field size. Anyway, UNIX_TIMESTAMP() does it all automatically, and that's even better. And yeah, I learned about the quotes the hard way (spending two hours fiddling with it so it would insert).