2019-01-31, 04:02 AM
Hello,
I am trying to get a working version of this but so far every time I attempt to make a test run of this by clicking "run task" it does not work.
Basically what the task is supposed to do is when run it should add +1 to any input of the field. So accounts that are at 54 when the task is run will then be 55. Its not working.
I've attached some screen shots of where it says it ran successfully, but its never logged nor does it actually go. I'm at a loss and starting to become frustrated.
Here is the PHP:
Updated:
Gave a screen shot collage to hopefully give some idea of the issue I'm having right now. Also tried to explain the point of the task a bit more for those that may not understand.
I am trying to get a working version of this but so far every time I attempt to make a test run of this by clicking "run task" it does not work.
Basically what the task is supposed to do is when run it should add +1 to any input of the field. So accounts that are at 54 when the task is run will then be 55. Its not working.
I've attached some screen shots of where it says it ran successfully, but its never logged nor does it actually go. I'm at a loss and starting to become frustrated.
Here is the PHP:
<?php
/**
* Author: Shinka
* Description: Task that, when ran, automatically adjusts all characters' ages
* based on current age, registration date, and current date.
*/
function task_age($task)
{
global $mybb, $db;
$INCREMENT = 1;
$query = $db->query("
UPDATE ".TABLE_PREFIX."userfields userfields
SET fid58 = CAST(fid58 as UNSIGNED) + {$INCREMENT};
");
add_task_log($task, "The age characters task successfully ran.");
}
Updated:
Gave a screen shot collage to hopefully give some idea of the issue I'm having right now. Also tried to explain the point of the task a bit more for those that may not understand.