Home  >  Article  >  Backend Development  >  都过来看看啊帮帮忙,怪怪的!

都过来看看啊帮帮忙,怪怪的!

WBOY
WBOYOriginal
2016-06-13 13:41:09819browse

各位高手都过来看看啊?帮帮忙,怪怪的!!
好奇怪啊,只能向mysql中插入500条数据,多一点也不行? 



+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 

for ($i = 2; $i sheets[0]['numRows']; $i++) { 

//以下注释的for循环打印excel表数据 


/* 

for ($j = 1; $j sheets[0]['numCols']; $j++) { 

echo "\"".$data->sheets[0]['cells'][$i][$j]."\","; 



echo "\n"; 

*/ 

//以下代码是将excel表数据【3个字段】插入到mysql中,根据你的excel表字段的多少,改写以下代码吧! 


$sql = "INSERT INTO uc_members(username ,Phone,Address,cattype) VALUES(". 
$data->sheets[0]['cells'][$i][4].",'". 
$data->sheets[0]['cells'][$i][4]."','". 
$data->sheets[0]['cells'][$i][2]."','". 
$data->sheets[0]['cells'][$i][3]."')".';'; 

if($data->sheets[0]['cells'][$i][4]==$data->sheets[0]['cells'][$i+1][4]){ 
echo '您的数据发现重复数据!'; 
}else{ 
mysql_query($sql); 

}



补充::该做的设置都试过了,页面运行时,数据库,头痛死了?就是不行啊?


------解决方案--------------------
超时?
------解决方案--------------------
打印出query时的$sql和返回值

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