PHP excel reader:databse表显示具有空值的多行 [英] PHp excel reader :databse table shows mutliple rows with empty values
问题描述
*这里是phpmyadmin表格图像:[访问此] http://i.imgur.com/P1tn3.png
*这里是我的excel表只有4行数据..
* here是我的PHP代码:从此mediafire链接下载: http://www.mediafire.com/?civnwaiolevl7yj
此代码是works..no问题abou那个...这个代码的问题是... b $ b **我认为你都可以理解我的问题...我如何能够在数据库表中保存这些空行...请帮助我恢复这个问题.....
测试$ arr [$ i] [1]的值,如果不是空的,请插入。
I have coded a php script to import excel sheet data to mysql database..code is 80% correct ..no errors shows..also all excel sheet data were added to the table...but problem is databse table shows some empty cells with value of 0..many no of rows appeared.... * here is the phpmyadmin table image:[visit this] http://i.imgur.com/P1tn3.png * here is my excel sheet has only 4 rows of data.. * here is my php code :download from this mediafire link : http://www.mediafire.com/?civnwaiolevl7yj
this code is works..no problem abou that...problem is out put of this code.... **I think u all are to can understand my problem...how can i stop saving those empty rows in my db table...please help me to recover this problem.....
Test the value of $arr[$i][1] and only do your insert if it's not empty
这篇关于PHP excel reader:databse表显示具有空值的多行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!