• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MongoDB with CI.

#1
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:
{
   
_idObjectID // by Mongo,
   
title"My first article",
   
body"Body body body text text"


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!
Reply

#2
Hi. I can not integrate codeigniter with mongodb
Reply

#3
@wspock,

I did find this information on github (codeigniter wiki): https://github.com/bcit-ci/CodeIgniter/w...odeigniter

It might be useful.
Reply

#4
(08-22-2018, 08:25 AM)php_rocs Wrote: @wspock,

I did find this information on github (codeigniter wiki): https://github.com/bcit-ci/CodeIgniter/w...odeigniter

It might be useful.

I got these error "The MongoDB PECL extension has not been installed or enabled". In pure PHP, works fine.
Reply

#5
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)"
Reply

#6
(08-24-2018, 12:19 PM)wspock Wrote:
(08-22-2018, 08:25 AM)php_rocs Wrote: @wspock,

I did find this information on github (codeigniter wiki): https://github.com/bcit-ci/CodeIgniter/w...odeigniter

It might be useful.

I got these error "The MongoDB PECL extension has not been installed or enabled". In pure PHP, works fine.

I had the same error, how do you fix?
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.