简体   繁体   English

使用JSON和jQuery的可编辑数据表?

[英]Editable table of data with JSON and jQuery?

For sports race results, I'm considering storing the results data as JSON in MySQL and would like to provide an easy interface for editing. 对于体育比赛的结果,我正在考虑将结果数据以JSON的形式存储在MySQL中,并希望提供一个易于编辑的界面。

Is there anything that can take JSON produce a table, allow editing and update the JSON object..? 有什么可以让JSON产生表格,允许编辑和更新JSON对象的方法吗? which could then be passed back to PHP/MySQL. 然后可以将其传递回PHP / MySQL。

The results data looks like: 结果数据如下所示:

Race    Grade     First     Second      Third       Time
350M    ‘A’       S. Samy   T. Harris   F. Cullin   31:72
450M    ‘B’       S. Bucket R. Jones    M. Jones    33:21
550M    'C'       R. Oly    S. Woods    P. Kircher  

You should store data in a relational database. 您应该将数据存储在关系数据库中。 Use functions or a framework utility to convert it to JSON format, then pass it to the webpage for javascript to consume and present to the user. 使用函数或框架实用程序将其转换为JSON格式,然后将其传递给网页以供javascript使用并呈现给用户。

If a NoSQL database is suitable to your needs, they can store JSON documents and those documents are therefore emitted as JSON. 如果NoSQL数据库适合您的需求,则它们可以存储JSON文档,因此这些文档将作为JSON发出。 CouchDB is one example of these non-relational databases. CouchDB是这些非关系数据库的一个示例。

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

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