Asf_Db_AbstractQueryBuilder::whereIn


Description

public object whereIn(string $columns, array $value)

Parameters

columns

数据库字段名称

value

字段的值

Return Values

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

Examples

Example #1

<?php
use Asf\Db\QueryBuilder\Select;

$select = new Select();
$select->cols()
    ->from('test') 
    ->whereIn('pid', array('100', 200))
    ->orWhereIn('cid', array('10', 20));

// string(98) "[SQL] SELECT * FROM `test` WHERE `pid` IN (?,?) OR `cid` IN (?,?) [BVALUES] 100 , 200 , 10 , 20"
var_dump($select->show());