- show next logical order number when creating new ticket category, fixes #464
This commit is contained in:
@@ -442,6 +442,20 @@ class ticket
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* get the highest order number
|
||||
*
|
||||
* @param object $_db database-object
|
||||
*
|
||||
* @return int highest order number
|
||||
*/
|
||||
static public function getHighestOrderNumber($_db = null)
|
||||
{
|
||||
$sql = "SELECT MAX(`logicalorder`) as `highestorder` FROM `" . TABLE_PANEL_TICKET_CATS . "`;";
|
||||
$result = $_db->query_first($sql);
|
||||
return (isset($result['highestorder']) ? (int)$result['highestorder'] : 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the last x archived tickets
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user