0

I am using a php file to connect to my Cloudant database and retrieve a specific Json document. The connection is ok but how can I run this query in the php file to get back the results ? I already tested the query on the Cloudant Dashbord and I can visualize the results

{
  "selector": {
    "datetime": {
      "$gt": 0
    }
  },
  "fields": [
    "_id",
    "_rev",
    "status",
    "datetime",
    "temperature",
    "humidity",
    "sunintesity"
  ],
  "sort": [
    {
      "datetime": "desc"
    }
  ],
  "limit" : 1
}
  • Can you show us what you have tried? If you are more specific it may help us help track down your issue. If you are just getting started then I would follow the tutorials as suggested by @Umberto in his answer. – markwatsonatx Apr 18 '16 at 17:47

1 Answers1

0

I suggest you to take a look at Cloudant Docs - Libraries and Tutorials#PHP. There you can find some CRUD examples also in many other languages and some pointers to useful libraries or framework you could use in your application.

Umberto Manganiello
  • 3,213
  • 9
  • 16