Home  >  Article  >  php教程  >  thinkphp添加数据函数

thinkphp添加数据函数

PHP中文网
PHP中文网Original
2016-05-25 17:11:331096browse

thinkphp添加数据函数

public function add($table, $data) {
    $Blog = M($table); //实例化模型类
    $lastblogId = $Blog->add($data);
    return $lastblogId;
}

$table 表名称
$data  数据数组

                   

以上就是thinkphp添加数据函数的内容,更多相关内容请关注PHP中文网(www.php.cn)!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:php数组循环Next article:phpcms 导航 当前位置