📄 正在查看:twcms/kongphp/db/db.interface.php
大小:1,128 字节 · 修改:2014-01-23 01:42:52 · 行数:30
1<?php
2/**
3 * Copyright (C) 2013-2014 www.kongphp.com All rights reserved.
4 * Licensed http://www.gnu.org/licenses/lgpl.html
5 * Author: wuzhaohuan <kongphp@gmail.com>
6 */
7// 请参考 db_mysql.class.php 开发新模块
8
9interface db_interface {
10 public function get($key);
11 public function multi_get($keys);
12 public function set($key, $data);
13 public function update($key, $data);
14 public function delete($key);
15 public function maxid($key, $val = FALSE);
16 public function count($key, $val = FALSE);
17 public function truncate($table);
18 public function version();
19
20 public function find_fetch($table, $pri, $where = array(), $order = array(), $start = 0, $limit = 0);
21 public function find_fetch_key($table, $pri, $where = array(), $order = array(), $start = 0, $limit = 0);
22 public function find_update($table, $where, $data, $lowprority = FALSE);
23 public function find_delete($table, $where, $lowprority = FALSE);
24 public function find_maxid($key);
25 public function find_count($table, $where = array());
26
27 public function index_create($table, $index);
28 public function index_drop($table, $index);
29}
30