Asf_Db_AbstractQueryBuilder::from


Description

public object from(string $name [, string $alias_name = ''])

Parameters

name

数据库字段名称

alias_name

别名

Return Values

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

Examples

Example #1

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

$select = new Select();
$select->cols('id, user')
    ->from('test1', 'a')
    ->where('sid', 1)
    ->limit(0, 1);

// string(78) "[SQL] SELECT id, user FROM `test1` a WHERE `sid` = ? LIMIT 0, 1 [BVALUES] 1"
var_dump($select->show());