dongxi5494 2010-06-06 17:33
浏览 59
已采纳

我可以使用PHP和OData公开MySQL数据吗?

As I understand it, OData is just a standardized way to expose relational data RESTfully. If I've got a PHP application, it should be able to process those RESTful requests and manipulate a MySQL database based on the request data and then return an ATOM feed. First, are the preceeding statements correct? Second, does a PHP library to do this already exist or would I have to create my own?

If I have completely misunderstood these technologies and my question doesn't make sense, please feel free to let me know.

  • 写回答

4条回答 默认 最新

  • douhuiqi3855 2010-06-10 06:18
    关注

    OData is a way of exposing all sorts of structured data over an HTTP interface. The underlying repository for data may be relational or not. For example, when using WCF Data Services on top of SQL Server it's certainly a relational data set, but the OData endpoints in SharePoint Server 2010 or on Windows Azure Table Storage run on top of other data models. The high order bit is to make all data available in a web-friendly way.

    As for your specific question about MySQL/PHP, there is an OData client for PHP but to my knowledge there isn't a server implementation available. I know there is a MySQL provider for ADO.NET, maybe if it has Entity Framework support you can use WCF Data Services, but that means you'd be running on .NET and not on PHP, don't know if it's acceptable for your situation.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!