src/Mysqli.php
public function add($data = '')
    {
        $newField = '';
        $data     = is_array($data) ? $data : explode(',', $data);

        foreach ($data as $k => $v) {
            $v = str_replace('\'', '\\\'', $v);
            $v = str_replace('\\', '\\/\\', $v);
            $newField .= $this->addFieldTag($k) . ' = \'' . $v . '\',';
        }

        $newField    = substr($newField, 0, -1);
        $this->field = $newField;

        $this->_sql = 'INSERT INTO `' . $this->table . '` SET ' . $this->field;
        $result     = $this->query();
        if ($result) {
            $result = max(mysqli_insert_id($this->linkId), 1);
        }
        return $result;
    }
public function add($data = '')
    {
        $newField = '';
        $data     = is_array($data) ? $data : explode(',', $data);

        foreach ($data as $k => $v) {
            $v = str_replace('\'', '\\\'', $v);
            $v = str_replace('\\', '\\/\\', $v);
            $newField .= $this->addFieldTag($k) . ' = \'' . $v . '\',';
        }

        $newField    = substr($newField, 0, -1);
        $this->field = $newField;

        $this->_sql = 'INSERT INTO `' . $this->table . '` SET ' . $this->field;
        $result     = $this->query();
        if ($result) {
            $result = max(mysqli_insert_id($this->linkId), 1);
        }
        return $result;
    }
添加
@date   2017-03-19T16:19:43+0800
@author ChenMingjiang
@param  string                   $data [description]