php - dump real data from rethinkdb table


I'm using the recommended PHP client driver for rethinkdb and I created a database and also a table unto that database, now I'm trying to retrieved all the documents from the specific table from a newly created database by

$conn = r\connect('localhost');
$res = r\db("queapp_db")->table("cities_and_states")->run($conn);
echo '<pre>';

but it gives me this

enter image description here

I can't verify from the return results if my expected data was returned or not due to simply the return output seems not like of my expected results. Any help ideas on how to display the records that I inserted?




The$res in your code is a cursor object, you need to iterate to get the documents inside:

foreach ($res as $doc) {

People are also looking for solutions to the problem: PHP script not found by Java but works in browser


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.