티스토리 뷰
xe/classes/db/DBMysql.class.php
/**
* Return the sequence value incremented by 1
* Auto_increment column only used in the sequence table
* @return int
*/
function getNextSequence()
{
$query = sprintf("insert into `%ssequence` (seq) values ('0')", $this->prefix);
$this->_query($query);
$sequence = $this->db_insert_id();
if($sequence % 10000 == 0)
{
$query = sprintf("delete from `%ssequence` where seq < %d", $this->prefix, $sequence);
$this->_query($query);
}
return $sequence;
}
/**
* Get the ID generated in the last query
* Return next sequence from sequence table
* This method use only mysql
* @return int
*/
function db_insert_id()
{
$connection = $this->_getConnection('master');
return mysql_insert_id($connection);
}
테이블 스크립트
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- 생성 시간: 19-07-12 21:04
-- 서버 버전: 10.3.8-MariaDB
-- PHP 버전: 7.2.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- 데이터베이스: `xe`
--
-- --------------------------------------------------------
--
-- 테이블 구조 `xe_sequence`
--
CREATE TABLE `xe_sequence` (
`seq` bigint(64) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- 테이블의 덤프 데이터 `xe_sequence`
--
INSERT INTO `xe_sequence` (`seq`) VALUES
(1),
(2),
(3),
(4),
(5),
(6),
(7),
(8),
(9),
(10),
(11),
(12),
(13),
(14),
(15),
(16),
(17),
(18),
(19),
(20),
(21),
(22),
(23),
(24),
(25),
(26),
(27),
(28),
(29),
(30),
(31),
(32),
(33),
(34),
(35),
(36),
(37),
(38),
(39),
(40),
(41),
(42),
(43),
(44),
(45),
(46),
(47),
(48),
(49),
(50),
(51),
(52),
(53),
(54),
(55),
(56),
(57),
(58),
(59),
(60),
(61),
(62),
(63),
(64),
(65),
(66),
(67),
(68),
(69),
(70),
(71),
(72),
(73),
(74),
(75),
(76),
(77),
(78),
(79),
(80),
(81),
(82),
(83),
(84),
(85),
(86),
(87),
(88),
(89),
(90),
(91),
(92),
(93),
(94),
(95),
(96);
--
-- 덤프된 테이블의 인덱스
--
--
-- 테이블의 인덱스 `xe_sequence`
--
ALTER TABLE `xe_sequence`
ADD PRIMARY KEY (`seq`);
--
-- 덤프된 테이블의 AUTO_INCREMENT
--
--
-- 테이블의 AUTO_INCREMENT `xe_sequence`
--
ALTER TABLE `xe_sequence`
MODIFY `seq` bigint(64) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=97;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
'XE(XpressEngine) 팁' 카테고리의 다른 글
xe db 직접 select (0) | 2018.09.07 |
---|---|
xe db prefix 얻기 (0) | 2018.09.07 |
xe_official layout 에서 우측에 3개 애드센스 나오는 레이아웃 (0) | 2018.07.25 |
xe 직접 file down & insert & replace (0) | 2018.07.10 |
카페24에서 xe 이전(마이그레이션) 하는 방법 (1) | 2017.12.20 |
- Total
- Today
- Yesterday
- php
- proc
- xe addon
- esql
- 포인터
- MySQL
- 프로씨
- XE3
- webix
- 파이썬
- 자바 smtp
- 파싱
- 스크래핑
- 이클립스
- 인포믹스
- EC
- C
- C언어
- Python
- ocjap
- JDBC
- XE
- xe애드온
- 플러터
- 오라클
- 자바
- KG
- ocpjp
- ocajp
- 문자열
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |