mysql批量添加数据

admin5年前php1056

$conn=new sqlhelper;



for ($i = 0; $i <1000 ; $i++) {

$sql="insert into system_user(user_shenfen_id,user_email,user_passwod) values (concat($i,'3336'),'001@163.com','8844')";

$conn->run_done($sql);

}


相关文章

php再调用json_decode从字符串对象生成json对象时出现Cannot use object of type stdClass as array解决方法

php再调用json_decode从字符串对象生成json对象时,如果使用[]操作符取数据,会得到下面的错误:Cannot use object of type stdClass as array产生...

php过滤emod与特殊字符

<?php  function xml_entities($string) { //过滤emod $ts_zifu= json_encode($st...

把一个索引数组内的某个元素删除后直接转成json输出,数据格式不正确

可以看到数组格式在unset后发生变化 解决方法很简单 仅一行代码就可以解决在foreach后 增加$arr = array_values($arr);转至:https://blog.csdn.net...

php设置16位的md5加密方法

用substr函数实现substr(md5(变量),8,16);就可以实现默认的md5(变量)输出的是32位加密方法...

数组问题整理

$arr[]           //用于收集子数组;serialize($arr)&nb...

php替换ASCIII码空格字符的方法

需要用到PHP自带函数chr()方法如下:$string=str_replace(chr(0x01),"",$string);...

发表评论    

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。