/** * Retrieves a single TenantType with the given ID. * @param int $id The ID of the TenantType to return * @return NULL|\TenantType The TenantType with the given ID, or NULL if no TenantType with the given ID was found */ public static function GetByID($id) { if (!is_numeric($id)) { return null; } global $MySQL; $query = "SELECT * FROM " . System::$Configuration["Database.TablePrefix"] . "TenantTypes WHERE tenanttype_ID = " . $id; $result = $MySQL->query($query); $count = $result->num_rows; if ($count == 0) { return null; } $values = $result->fetch_assoc(); return TenantType::GetByAssoc($values); }