我正在写一个插件,需要存储一天(每天)的数据。数据从CSV文件中检索。
I will be retrieving three columns of financial data (Fund ID, Fund Description and Price) from the CSV files. The Fund ID and Description will be text and the price will obviously be in a currency. The number of entries in each CSV file will be less than 100.
然后,这些数据将在各种帖子中使用(通过引用一个简短的代码),但我有一个问题,那就是如何存储这些数据,以便从多个帖子中访问这些数据。When I say used, the fund price will be displayed - that is all.我可以在WordPress插件中使用add\\u post\\u元功能存储数据。但从逻辑上讲,这是在特定帖子的上下文中存储数据。我想象我可以“选择”一个post ID,并始终从那里存储(和检索)数据。我可以想出各种奇怪的方案来解决这个问题,但我想知道是否有一种可以接受的方法来做到这一点,而不必在数据库中创建自定义表。我只是希望能朝着正确的方向前进,任何想法都将不胜感激。
更新:感谢@JacobPeattie提出的细化问题的建议。