Home  >  Article  >  Backend Development  >  php+mysql循环安插数据。

php+mysql循环安插数据。

WBOY
WBOYOriginal
2016-06-13 11:31:53711browse

php+mysql循环插入数据。。急急急


//现在要取出每个编码对应的数据做插入。。
for($i=0;$i{
echo $bms[$i]."---------".$sls[$i]."-----".$pro_b."
";
echo $sql="select * from xxx where 编码='$bms[$i]'";
echo "
";

}

//详细说明,上面假如'编码'循环为:101 102 103 104 我要做的事是
//$sql="select * from xxx where 编码='101'
//然后把编码是101对应的数据取出来做插入
//$sql="select * from xxx where 编码='102'
//然后把编码是102对应的数据取出来做插入

。。。。。
//新手求教,不胜感激,不知道我的意思表达清楚了没有,技术有限正在学习中望各位不要骂
给点提示,指导

PHP MySQL
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