Hello,
First time working with mongoDB within PHP.
So i am just wondering on how i should go forward with this.
So i have a database (mongodb) with a few entrys, that was given by a bot for a server i have.
What i am trying to do:
Fetch the data from the database, check if user has role "498147873003798539" (some has more then one role that is stored in an array so i will need to check the role arrays for that value, will show example of database layout).
So when i have found the useres with role "498147873003798539" i want to echo out their nickname.
Example Database Layout
I don't use MongoDB either. And those Mongo classes don't help either. You need to look in the PHP class itself to see what parameters each function requires and how it will return the results.
Example: Where is the SELECT statement? In MySQL that is where you define what columns you want returned, from which table, maybe a WHERE clause to limit the rows, then the sort order. MongoDB should work the same way.
Based on your code sample I 'assume' the SELECT statement should be put in the $filter variable. You would need to check the function in the class file itself to see what/how parameters are required.
If you are just learning MongoDB with PHP then I think you've made your work harder by using those classes.
Thanks! I didnt get it to work with mongodb, so i recreated the bot to post to mysql insted.
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)