Hi,
I'm figuring out the best way to add a department not using the form in the admin panel.
I want to use the includes/functions_departments.php file for this and want to read out the last order number first.
I was thinking about setting the order number column on autoincrement because I actually don't care about how they are ordered.
But, when I need to do, I first need to grab that one and I was not able to fnd out the best way.
Ok, we have a function for adding the department:
function insertDepartment($title, $departmentmodule, $tgroupidlist, $type = "1", $displayorder = "1", $isdefault = false)
So I can actually call this like:
insertDepartment(name, tickets, {dunno yet}, public, {?? display order ??}, 0);
This should be working if you ask me in a normal PHP file.
Because we have the function getLastDepartmentDisplayOrder() to check the latest order number, shall I just set this one to:
$orderno = function getLastDepartmentDisplayOrder();
and place $orderno in the line above ?
Some advise would be nice
Thanks.