MongoDB with CI. |
Hello, I'm new with a NoSQL implementation. I'm using MongoDB with CI and it works very well, but I have a question.
I saw that in each collection, mongo creates an _id column that is an object that contains some data. Now, suppose that I've a page with articles an a document foreach article like this: PHP Code: { and I want to read this article, how can I do that? I don't think that something like website.dev/article/_id (where _id is the value in the document) is correct.. so how can I do that? I readed that if I create a sort of auto_increment, like MySQL, mongo won't scale effectively. I'm new in this world, maybe I'm wrong in something and you can suggest me something! Thank you!
@wspock,
I did find this information on github (codeigniter wiki): https://github.com/bcit-ci/CodeIgniter/w...odeigniter It might be useful. (08-22-2018, 08:25 AM)php_rocs Wrote: @wspock, I got these error "The MongoDB PECL extension has not been installed or enabled". In pure PHP, works fine.
Work for now, but, appears these error "Message: Server at localhost:27017 reports wire version 0, but this version of libmongoc requires at least 2 (MongoDB 2.6)"
(08-24-2018, 12:19 PM)wspock Wrote:(08-22-2018, 08:25 AM)php_rocs Wrote: @wspock, I had the same error, how do you fix? |
Welcome Guest, Not a member yet? Register Sign In |