Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
391 views
in Technique[技术] by (71.8m points)

PHp excel reader :databse table shows mutliple rows with empty values

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.....

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Test the value of $arr[$i][1] and only do your insert if it's not empty


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...