return $count;
}
+ public static function Get($id){
+ $query = 'SELECT `id`,`type`,`status` FROM `ticket` WHERE `id` = ? LIMIT 1';
+ $stmt = Ticketing::Get()->database()->prepare($query);
+ $stmt->bind_param('i', $type);
+ $stmt->execute();
+ $stmt->bind_result($id, $type, $status);
+ $ticket = null;
+ if($stmt->fetch()){
+ $ticket = new Ticket($id, $type, $status);;
+ }
+ $stmt->close();
+ return $ticket;
+ }
+
public static function Allocate_Available($type){
if($type instanceof Type){
$type = $type->id();