Topic: Extension Help - SET values in query_builder
I can't figure out why this won't update the values in MySQL. Anyone have any insight?
I've created the proper columns in the install portion of the extension.
// check for first visit
if (!isset($forum_user['access_time']) || $forum_user['access_time'] == '0')
{
$forum_user['access_time'] = time() - 60;
}
if ($forum_user['g_id'] == FORUM_ADMIN)
{
// rates, need to be entered into db sometime in the future
$wood_rate = array(20,48,84,128,180,240,308,384,468,560);
// main function for value of resource
$rate = $wood_rate['5'] / 60 / 60; // rate per second
$forum_user['wood_amount'] = $forum_user['wood_amount'] + (time() - $forum_user['access_time']) * $rate;
// set values in db
if (!isset($bb_new_values))
{
$bb_query = array(
'UPDATE' => 'users',
'SET' => 'access_time = '.$forum_user['access_time'].', wood_amount = '.$forum_user['wood_amount'],
'WHERE' => 'id='.$forum_user['id']
);
$forum_db->query_build($bb_query) or error(__FILE__, __LINE__);
}