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

php+mysql循环安插数据。

WBOY
WBOYOriginal
2016-06-13 12:40:101029browse

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

<br />
//现在要取出每个编码对应的数据做插入。。<br />
for($i=0;$i<count($bms);$i++)<br />
{<br />
echo $bms[$i]."---------".$sls[$i]."-----".$pro_b."<br>";<br />
echo $sql="select * from xxx where 编码='$bms[$i]'";<br />
echo "<br>";<br />
<br />
}<br />
<br />
//详细说明,上面假如'编码'循环为:101 102 103 104 我要做的事是<br />
//$sql="select * from xxx where 编码='101' <br />
//然后把编码是101对应的数据取出来做插入<br />
//$sql="select * from xxx where 编码='102' <br />
//然后把编码是102对应的数据取出来做插入<br />
<br />
。。。。。<br />
//新手求教,不胜感激,不知道我的意思表达清楚了没有,技术有限正在学习中望各位不要骂<br />
给点提示,指导<br />

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