CrossPHP
  • Namespace
  • Class
  • Download

Namespaces

  • Cross
    • Auth
    • Cache
      • Driver
      • Request
    • Core
    • DB
      • Connecter
      • Drivers
      • SQLAssembler
    • Exception
    • Http
    • I
    • Lib
      • Document
    • Module
    • MVC
    • Runtime
  • None

Classes

  • Cross\Auth\CookieAuth
  • Cross\Auth\SessionAuth
  • Cross\Cache\Driver\FileCacheDriver
  • Cross\Cache\Driver\MemcacheDriver
  • Cross\Cache\Driver\RedisDriver
  • Cross\Cache\Request\FileCache
  • Cross\Cache\Request\Memcache
  • Cross\Cache\Request\RedisCache
  • Cross\Cache\RequestCache
  • Cross\Core\Annotate
  • Cross\Core\Application
  • Cross\Core\ArrayMap
  • Cross\Core\Config
  • Cross\Core\CrossArray
  • Cross\Core\Delegate
  • Cross\Core\FrameBase
  • Cross\Core\Helper
  • Cross\Core\HttpAuth
  • Cross\Core\Loader
  • Cross\Core\Rest
  • Cross\Core\Router
  • Cross\DB\Connecter\BaseConnecter
  • Cross\DB\Connecter\MySQLConnecter
  • Cross\DB\Connecter\PgSQLConnecter
  • Cross\DB\Connecter\SQLiteConnecter
  • Cross\DB\DBFactory
  • Cross\DB\Drivers\CouchDriver
  • Cross\DB\Drivers\MongoDriver
  • Cross\DB\Drivers\PDOSqlDriver
  • Cross\DB\SQLAssembler\MySQLAssembler
  • Cross\DB\SQLAssembler\PgSQLAssembler
  • Cross\DB\SQLAssembler\SQLAssembler
  • Cross\DB\SQLAssembler\SQLiteAssembler
  • Cross\Http\Request
  • Cross\Http\Response
  • Cross\Lib\Array2XML
  • Cross\Lib\Document\CallTree
  • Cross\Lib\Document\CallTreeToHTML
  • Cross\Lib\Document\HTML
  • Cross\Lib\StringToPHPStream
  • Cross\Module\SQLModule
  • Cross\MVC\Controller
  • Cross\MVC\Module
  • Cross\MVC\View
  • Cross\Runtime\ClosureContainer

Interfaces

  • Cross\I\CacheInterface
  • Cross\I\HttpAuthInterface
  • Cross\I\PDOConnecter
  • Cross\I\RequestCacheInterface
  • Cross\I\RouterInterface
  • Cross\I\SqlInterface

Exceptions

  • Cross\Exception\CacheException
  • Cross\Exception\CoreException
  • Cross\Exception\CrossException
  • Cross\Exception\FrontException

Functions

  • ascLogo
  • line
  • tBody
  • th
  • tHead
 1 <?php
 2 /**
 3  * Cross - a micro PHP 5 framework
 4  *
 5  * @link        http://www.crossphp.com
 6  * @license     MIT License
 7  */
 8 namespace Cross\I;
 9 
10 /**
11  * Interface SqlInterface
12  *
13  * @package Cross\I
14  */
15 interface SqlInterface
16 {
17     /**
18      * 获取一条数据
19      *
20      * @param string $table 表名
21      * @param string $fields 字段
22      * @param string|array $where 条件(建议只使用字符串常量,包含变量时请使用数组)
23      * @return mixed
24      */
25     function get($table, $fields, $where);
26 
27     /**
28      * 批量获取表中的数据
29      *
30      * @param string $table 表名
31      * @param string $fields 要获取的字段名
32      * @param string|array $where 条件(建议只使用字符串常量,包含变量时请使用数组)
33      * @param int|string $order 排序
34      * @param int|string $group_by 分组
35      * @param int|string $limit 0表示无限制
36      * @return mixed
37      */
38     function getAll($table, $fields, $where = '', $order = 1, $group_by = 1, $limit = 0);
39 
40     /**
41      * 带分页的查询
42      *
43      * @param string $table 表名
44      * @param string $fields 字段名
45      * @param string|array $where 条件(建议只使用字符串常量,包含变量时请使用数组)
46      * @param string|int $order 排序
47      * @param array $page array('p', 'limit'); p表示当前页数, limit表示要取出的条数
48      * @param int $group_by
49      * @return mixed
50      */
51     function find($table, $fields, $where, $order = 1, array &$page = array('p', 'limit'), $group_by = 1);
52 
53     /**
54      * 添加数据
55      *
56      * @param string $table 表名
57      * @param string $data 要插入的数据
58      * @param bool $multi 是否批量插入
59      * @return mixed
60      */
61     function add($table, $data, $multi = false);
62 
63     /**
64      * 更新数据
65      *
66      * @param string $table 表名
67      * @param string $data 要更新的数据
68      * @param string $where 筛选条件
69      * @return mixed
70      */
71     function update($table, $data, $where);
72 
73     /**
74      * 删除数据
75      *
76      * @param string $table 表名
77      * @param string $where 条件
78      * @return mixed
79      */
80     function del($table, $where);
81 
82 }
83 
CrossPHP API documentation generated by ApiGen