Cml\Model::set PHP Method

set() public method

增加一条数据-快捷方法
public set ( array $data, string $tableName = null, mixed $tablePrefix = null ) : integer
$data array 要新增的数据
$tableName string 表名 不传会自动从当前Model中$table属性获取
$tablePrefix mixed 表前缀 不传会自动从当前Model中$tablePrefix属性获取再没有则获取配置中配置的前缀
return integer
    public function set($data, $tableName = null, $tablePrefix = null)
    {
        is_null($tableName) && ($tableName = $this->getTableName());
        is_null($tablePrefix) && ($tablePrefix = $this->tablePrefix);
        return $this->db($this->getDbConf())->set($tableName, $data, $tablePrefix);
    }