lastInsertId(); } /** * Returns room by id. * * @param int $room_id RID * @param bool $onlyVisible * @return array|false */ function Room($room_id, $onlyVisible = true) { $room_source = DB::select(' SELECT * FROM `Room` WHERE `RID` = ? ' . ($onlyVisible ? 'AND `show` = \'Y\'' : ''), [$room_id] ); if (DB::getStm()->errorCode() != '00000') { return false; } if (empty($room_source)) { return null; } return array_shift($room_source); }