Download the PHP package flatphp/lightdb without Composer
On this page you can find all versions of the php package flatphp/lightdb. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package lightdb
Lightdb
Lightdb is a simple db component. 轻量DB库
Install 安装
Usage 使用
Support Fetch Method
method | intro |
---|---|
fetchAll | fetch all array with assoc, empty array returned if nothing or false |
fetchAllIndexed | fetch all with first field as indexed key, empty array returned if nothing or false |
fetchAllGrouped | fetch all grouped array with first field as keys, empty array returned if nothing or false |
fetchRow | fetch one row array with assoc, false is returned if failure |
fetchColumn | fetch first column array, empty array returned if nothing or false |
fetchColumnGrouped | fetch grouped column array with first field as keys of grouped array, empty array returned if nothing or false |
fetchPairs | fetch pairs of first column as Key and second column as Value, empty array returned if nothing or false |
fetchPairsGrouped | fetch grouped pairs of K/V with first field as keys of grouped array, empty array returned if nothing of false |
fetchOne | fetch one field value, false returned if nothing or false |
fetchAllTo | fetch all to classes array, empty array returned if nothing or false |
fetchAllIndexedTo | fetch all to classes array with firest field as indexed key, empty array returned if nothing or false |
fetchAllGroupedTo | fetch all grouped array with first field as keys, empty array returned if nothing or false |
fetchRowTo | fetch one row to class, false is returned if failure |
Master-Slaves 主从使用
Multiple DB Instance 多DB实例
Transaction 事务
another way:
Query Builder sql构建查询
Select
Insert
Update
Delete
Query Join Method
- leftJoin($table, $on, $bind = null)
- rightJoin($table, $on, $bind = null)
- innerJoin($table, $on, $bind = null)
- fullJoin($table, $on, $bind = null)
Query Where Method
- where($where, $bind = null)
- whereIn($field, array $values)
- whereNotIn($field, array $values)
- orWhere($where, $bind = null)
- orWhereIn($field, array $values)
- orWhereNotIn($field, array $values)
Query Limit and Offset
- limit($limit, $offset = 0)
- offset($offset)
- page($page, $page_size = 10)
Query Count
- count() (ignore limit and offset)
Execute
- insert(array $data)
- update(array $data)
- delete()
All versions of lightdb with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.5
ext-pdo Version *
ext-pdo Version *
The package flatphp/lightdb contains the following files
Loading the files please wait ....