<spanmicrosoft yahei font-size:><span>1</span> <span>$User</span> = M("User"); <span>//</span><span> 实例化User对象</span> <span>2</span> <span>$data</span>['name'] = 'ThinkPHP'<span>; </span><span>3</span> <span>$data</span>['email'] = 'ThinkPHP@gmail.com'<span>; </span><span>4</span> <span>$User</span>->add(<span>$data</span><span>); </span><span>5</span> <span>6</span> <span>$dataList</span>[] = <span>array</span>('name'=>'thinkphp','email'=>'thinkphp@gamil.com'<span>); </span><span>7</span> <span>$dataList</span>[] = <span>array</span>('name'=>'onethink','email'=>'onethink@gamil.com'<span>); </span><span>8</span> <span>$User</span>->addAll(<span>$dataList</span>);</spanmicrosoft>
<spanmicrosoft yahei font-size:>INSERT INTO tbl_name (a,b,c) VALUES(1,2,3),(4,5,6),(7,8,9);</spanmicrosoft>Nach dem Login kopieren
<spanmicrosoft yahei font-size:>max_allowed_packet = 100M</spanmicrosoft>Nach dem Login kopieren
Das Obige stellt das maximale Datenvolumen vor, das von addAll von THINKPHP unterstützt wird, einschließlich der relevanten Inhalte. Ich hoffe, es wird für Freunde hilfreich sein, die sich für PHP-Tutorials interessieren.