![]() |
MongoDB with CI. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: MongoDB with CI. (/showthread.php?tid=70427) |
MongoDB with CI. - theedo - 04-07-2018 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! RE: MongoDB with CI. - wspock - 08-22-2018 Hi. I can not integrate codeigniter with mongodb RE: MongoDB with CI. - php_rocs - 08-22-2018 @wspock, I did find this information on github (codeigniter wiki): https://github.com/bcit-ci/CodeIgniter/wiki/Using-MongoDB-in-Codeigniter It might be useful. RE: MongoDB with CI. - wspock - 08-24-2018 (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. RE: MongoDB with CI. - wspock - 08-24-2018 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)" RE: MongoDB with CI. - mtavares - 09-04-2018 (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? |