I want to execute this SQL query:
SELECT * FROM `wcf1_user` WHERE `lastActivityTime` < 1343642175
But I receive this error:
#1054 - Unknown column '1343642175' in 'where clause'
But this makes absolutely no sense. 1343642175 isn't my column, lastActivityTime is it.
I tried it in phpMyAdmin like this: phpmyadmin
The error is the same.
Any ideas?
Here is my full code:
$date = strtotime("-1 month");
$db = & JDatabase::getInstance( $option );
$query = $db->getQuery(true);
$query ->select('userID, username, email, lastActivityTime')
->from('wcf1_user')
->where('lastActivityTime < '.(int) $date);
$db->setQuery($query);
$result=$db->loadObjectList();
Note: that this is made inside a joomla component
EDIT:
Now it works fine, I haven't done anything to my code. I just restarted my Computer. I don't know what caused this error, but now it's gone.