ZBlogPHP::GetListCustom PHP Method

GetListCustom() public method

查询指定数据结构的sql并返回Base对象列表
public GetListCustom ( string $table, string $datainfo, string $sql ) : array
$table string 数据表
$datainfo string 数据字段
$sql string SQL操作语句
return array
    public function GetListCustom($table, $datainfo, $sql)
    {
        $array = null;
        $list = array();
        $array = $this->db->Query($sql);
        if (!isset($array)) {
            return array();
        }
        foreach ($array as $a) {
            $l = new Base($table, $datainfo);
            $l->LoadInfoByAssoc($a);
            $list[] = $l;
        }
        return $list;
    }
ZBlogPHP