Asf_Db_AbstractQueryBuilder::between


Description

public object between(string $columns, mixed $a, mixed $b)

Parameters

columns

数据库字段名称

a

区间起始值

b

区间终止值

Return Values

操作成功返回 Object, 失败返回 false

Examples

Example #1

<?php
// string(122) "[SQL] SELECT * FROM `test1` WHERE `status` BETWEEN ? AND ? AND `status` NOT BETWEEN '?' AND '?' [BVALUES] 0 , 2 , 1 , 3"

use Asf\Db;

$select = Db::QBS();
$select->cols()
    ->from('test1')
    ->between('status', 0, 2)
    ->notBetween('status', 1, 3);