Not Solved NOT WORKING | Task Manager, SQL Update Profile Field, +1 Increment
#1
Not Solved
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:
<?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.


Attached Files Thumbnail(s)
   
> SELECT finger FROM hand WHERE id='3'
Reply
#2
Not Solved
Try this:

<?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 $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.");
}
?>
Plugin Count: I lost count.
Public Plugins are available here.
Please do not PM me for support unless asked to.
Reply
#3
Not Solved
Unfortunately it is still not working.
> SELECT finger FROM hand WHERE id='3'
Reply
#4
Not Solved
Are you sure? Just tested and it works fine.
Plugin Count: I lost count.
Public Plugins are available here.
Please do not PM me for support unless asked to.
Reply
#5
Not Solved
Yeah its not working for me. Unless I've done some sort of setting wrong with the task manager area of the ACP, but when I click the run icon the next time to run time changes so it's like it worked but it never actually does and its not logged as ran successfully.
> SELECT finger FROM hand WHERE id='3'
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)