Re: [PHP] mysql_fetch_object() equivalent for mongoDB

2011-09-07 Thread Duken Marga
Actually, there is no statement in PHP that can return data from MongoDB as object (CMIIW). Data are returned as array. You can convert this array to object using (object). Look an example at http://www.richardcastera.com/blog/php-convert-array-to-object-with-stdclass $posts = (object) $mongo->fin

[PHP] mysql_fetch_object() equivalent for mongoDB

2011-09-06 Thread chamila gayan
hi all, Is anybody aware of mysql_fetch_object() equivalent/similar implementation for mongoDB? we are looking for the most efficient way to store and load a php object with mongoDB. really appreciate if you can share your experience on this. thanks.. ~Chamila Gayan