Home  >  Q&A  >  body text

phpexcel reader插件 导入数据入库问题

为什么我每次上传都会多出一行空行数据啊
,数据库总会多来一行空数据。我应该要在哪里做处理,怎么处理呢?我试过调都没能解决

某草草某草草2692 days ago534

reply all(2)I'll reply

  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-16 13:05:15

    It should be that when phpexcel reads it, it reads an empty row. Before splicing the SQL statement and executing the SQL, you should judge whether the field is empty. If every field in the entire row (or some required fields) If it is empty, continue

    reply
    0
  • 某草草

    某草草2017-05-16 13:05:15

    Print$data->sheet[0]['rownumber s'], check the actual number of rows read by the code in excel

    reply
    0
  • Cancelreply