简体   繁体   English

如何以表格形式显示网页上csv文件中的数据

[英]How to show data from a csv file on web page in tabular form

I am working on a system where i need to select millionsof records from mysql and there is no key is defined on that table as there is mass inserting and updating work simultaneously . 我正在一个需要从mysql中选择数百万条记录的系统上,并且由于大量插入和更新工作同时进行,因此该表上没有定义键。

So I use this command to a genrate csv file from selected data and its working for me in great way . 因此,我使用此命令从选定的数据生成csv文件,并且该文件可以很好地为我工作。

SELECT *
INTO OUTFILE 'E:\\31october\\SP\\Export\\xyz.csv'
FIELDS
  TERMINATED BY ','
  OPTIONALLY ENCLOSED BY '"'
  ESCAPED BY '\\'
  LINES TERMINATED BY '\n'
FROM tblspmaster;

but my problem is i also have to update the selected records and needs to show those records on aspx page . 但我的问题是我还必须更新所选记录,并且需要在aspx页面上显示这些记录。 if i run select its just running and running . 如果我运行,请选择它刚刚运行。

So I have two questions 所以我有两个问题

  1. How can I update another fields in that table using INTO OUTFILE of mysql . 如何使用INTO OUTFILEINTO OUTFILE更新该表中的其他字段。

  2. Is it possible that instead of showing records on web page from mysql response i just use this csv file to bind my gridview ? 是否有可能不是使用mysql响应在网页上显示记录,而是仅使用此csv文件来绑定我的gridview? or right custom HTML ? 还是正确的自定义HTML?

if you want show million of records the best way is "slickgrid", may be it will help you. 如果您想显示一百万条记录,最好的方法是“ slickgrid”,也许会对您有所帮助。

https://github.com/mleibman/SlickGrid https://github.com/mleibman/SlickGrid

https://github.com/mleibman/SlickGrid/wiki/Used-by https://github.com/mleibman/SlickGrid/wiki/二手

https://github.com/mleibman/SlickGrid/wiki/Examples https://github.com/mleibman/SlickGrid/wiki/Examples

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM