Calling a stored procedure via PHP in MongoDB
问题 Dear everybody who can help, I have this PHP > MongoDB problem, I want to call a stored procedure (stored in db.system.js collection) via PHP. I have no parameters, only a returning JSON object which looks like this: {"archived":[the number of the archived messages]} It works good in the shell on the database server, but when I try to call it via the PHP driver it just doesn't "say" anything... My code looks like this: $DB->execute( new MongoCode( "function () { return archiveMessages(); }" )