« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 21 for executeCommand (0.003 sec.)
MongoDB\Driver\Manager::executeCommand — Execute a database command | PHP 8.3 14021
MongoDB\Driver\Manager::executeCommand (mongodb >=1.0.0) MongoDB\Driver\Manager::executeCommand — Execute a database command 説明 final public function MongoDB\Driver\Manager::executeCommand ( string $db , MongoDB\Driver\Command $command , ... rds compatibility, this parameter will still accept a MongoDB\Driver\ReadPreference object. 例 例1 MongoDB\Driver\Manager::executeCommand() with a command returning a single result document <?php $manager = new MongoDB\Driver\Manager ( 'mongodb://localhost:270 ... 17' ); $command = new MongoDB\Driver\Command ([ 'ping' => 1 ]); try { $cursor = $manager -> executeCommand ( 'admin' , $command ); } catch( MongoDB\Driver\Exception $e ) { echo $e -> getMessage (), "\n" ; exit; } /* The ping comm ... 0 ]; var_dump ( $response ); ?> 上の例の出力は以下となります。 array(1) { ["ok"]=> float(1) } 例2 MongoDB\Driver\Manager::executeCommand() with a command returning a cursor <?php $manager = new MongoDB\Driver\Manager ( "mongodb://localhost:27017" ); $bulk = n ...
https://man.mtool.work/php/8.3/mongodb-driver-manager.executecommand.html
MongoDB\Driver\Server::executeCommand — Execute a database command on this serv... 10604
MongoDB\Driver\Server::executeCommand (mongodb >=1.0.0) MongoDB\Driver\Server::executeCommand — Execute a database command on this server 説明 final public function MongoDB\Driver\Server::executeCommand ( string $db , MongoDB\Driver\Command ... ngoDB\Driver\Server::executeWriteCommand() - Execute a database command that writes on this server MongoDB\Driver\Manager::executeCommand() - Execute a database command 他のマニュアルの関連ページ DuckDB CONNECT and DISCONNECT Statements DuckDB Tableau DuckDB M ...
https://man.mtool.work/php/8.3/mongodb-driver-server.executecommand.html
MongoDB\Driver\Command::__construct — Create a new Command | PHP 8.3 10334
MongoDB\Driver\Command::__construct (mongodb >=1.0.0) MongoDB\Driver\Command::__construct — Create a new Command 説明 final public function MongoDB\Driver\Command::__construct ( array | object $document , ? array $commandOptions = null ) Co ... n immutable value object that represents a database command. The command may then be executed with MongoDB\Driver\Manager::executeCommand() . The complete command document, which includes the command name and its options, should be expressed in the document pa ... ngodb://localhost:27017" ); $command = new MongoDB\Driver\Command (array( "buildinfo" => 1 )); try { $cursor = $manager -> executeCommand ( "admin" , $command ); $response = $cursor -> toArray ()[ 0 ]; } catch( MongoDB\Driver\Exception $e ) { echo $e -> getMes ... Driver\Command ( array( "distinct" => "beer" , "key" => "beer_name" , "maxTimeMS" => 10 , ) ); try { $cursor = $manager -> executeCommand ( "beerdb" , $command ); $response = $cursor -> toArray ()[ 0 ]; } catch( MongoDB\Driver\Exception\Exception $e ) { echo $ ...
https://man.mtool.work/php/8.3/mongodb-driver-command.construct.html
MongoDB\Driver\Cursor::__construct — Create a new Cursor (not used) | PHP 8.3 10046
MongoDB\Driver\Cursor::__construct (mongodb >=1.0.0) MongoDB\Driver\Cursor::__construct — Create a new Cursor (not used) 説明 final private function MongoDB\Driver\Cursor::__construct () MongoDB\Driver\Cursor objects are returned as the res ... or query and cannot be constructed directly. パラメータ この関数にはパラメータはありません。 参考 MongoDB\Driver\Manager::executeCommand() - Execute a database command MongoDB\Driver\Manager::executeQuery() - Execute a database query MongoDB\Driver\Server::ex ...
https://man.mtool.work/php/8.3/mongodb-driver-cursor.construct.html
Script Injection Attacks | PHP 8.3 9894
Script Injection Attacks If you are using JavaScript, make sure that any variables that cross the PHP- to-JavaScript boundary are passed in the scope field of MongoDB\BSON\Javascript , not interpolated into the JavaScript string. This can c ... rname = $_GET [ 'field' ]; $cmd = new \MongoDB\Driver\Command ( [ 'eval' => "print('Hello, $username !');" ] ); $r = $m -> executeCommand ( 'dramio' , $cmd ); ?> However, what if a malicious user passes in some JavaScript? <?php $m = new MongoDB\Driver\Manager ... db.users.drop(); print('" $cmd = new \MongoDB\Driver\Command ( [ 'eval' => "print('Hello, $username !');" ] ); $r = $m -> executeCommand ( 'dramio' , $cmd ); ?> Now MongoDB executes the JavaScript string "print('Hello, '); db.users.drop(); print('!');" . This ... ommand ( [ 'eval' => "function greet(username) { print('Hello, ' + username + '!'); }" , 'args' => $args , ] ); $r = $m -> executeCommand ( 'dramio' , $cmd ); ?> This adds an argument to the JavaScript scope, which gets used as argument for the greet function. ...
https://man.mtool.work/php/8.3/mongodb.security.script_injection.html
The MongoDB\Driver\ServerApi class | PHP 8.3 8761
The MongoDB\Driver\ServerApi class (mongodb >=1.10.0) はじめに クラス概要 final class MongoDB\Driver\ServerApi implements MongoDB\BSON\Serializable , Serializable { /* 定数 */ const string MongoDB\Driver\ServerAPI::V1 = "1" ; /* メソッド */ ... ' , [], [ 'serverApi' => $v1 ]); $command = new MongoDB\Driver\Command ([ 'buildInfo' => 1 ]); try { $cursor = $manager -> executeCommand ( 'admin' , $command ); } catch( MongoDB\Driver\Exception $e ) { echo $e -> getMessage (), "\n" ; exit; } /* The buildInfo ... ' , [], [ 'serverApi' => $v1 ]); $command = new MongoDB\Driver\Command ([ 'buildInfo' => 1 ]); try { $cursor = $manager -> executeCommand ( 'admin' , $command ); } catch( MongoDB\Driver\Exception $e ) { echo $e -> getMessage (), "\n" ; exit; } /* The buildInfo ...
https://man.mtool.work/php/8.3/class.mongodb-driver-serverapi.html
The MongoDB\Driver\Cursor class | PHP 8.3 8625
The MongoDB\Driver\Cursor class (mongodb >=1.0.0) はじめに The MongoDB\Driver\Cursor class encapsulates the results of a MongoDB command or query and may be returned by MongoDB\Driver\Manager::executeCommand() or MongoDB\Driver\Manager::exe ... mplements MongoDB\Driver\CursorInterface , which extends Traversable . 例 例1 Reading a result set MongoDB\Driver\Manager::executeCommand() and MongoDB\Driver\Manager::executeQuery() both return their result(s) as a MongoDB\Driver\Cursor object. This object ca ... oceed to insert a new document into that collection each second. <?php $manager = new MongoDB\Driver\Manager ; $manager -> executeCommand ( 'test' , new MongoDB\Driver\Command ([ 'create' => 'asteroids' , 'capped' => true , 'size' => 1048576 , ])); while ( tru ...
https://man.mtool.work/php/8.3/class.mongodb-driver-cursor.html
The MongoDB\Driver\Command class | PHP 8.3 8473
The MongoDB\Driver\Command class (mongodb >=1.0.0) はじめに The MongoDB\Driver\Command class is a value object that represents a database command. To provide Command Helpers the MongoDB\Driver\Command object should be composed. クラス概要 f ... ollection -> setCappedCollection ( 64 * 1024 ); try { $command = $createCollection -> getCommand (); $cursor = $manager -> executeCommand ( "databaseName" , $command ); $response = $cursor -> toArray ()[ 0 ]; var_dump ( $response ); $collstats = [ "collstats" ... => $createCollection -> getCollectionName ()]; $cursor = $manager -> executeCommand ( "databaseName" , new MongoDB\Driver\Command ( $collstats )); $response = $cursor -> toArray ()[ 0 ]; var_dump ( $respons ...
https://man.mtool.work/php/8.3/class.mongodb-driver-command.html
The MongoDB\Driver\Manager class | PHP 8.3 8203
The MongoDB\Driver\Manager class (mongodb >=1.0.0) はじめに The MongoDB\Driver\Manager is the main entry point to the extension. It is responsible for maintaining connections to MongoDB (be it standalone server, replica set, or sharded clus ... oDB\Driver\BulkWriteCommand $bulk , ? array $options = null ): MongoDB\Driver\BulkWriteCommandResult final public function executeCommand ( string $db , MongoDB\Driver\Command $command , ? array $options = null ): MongoDB\Driver\Cursor final public function ex ... oDB\Driver\Manager::executeBulkWriteCommand — Execute write operations using the bulkWrite command MongoDB\Driver\Manager::executeCommand — Execute a database command MongoDB\Driver\Manager::executeQuery — Execute a database query MongoDB\Driver\Manager::execu ...
https://man.mtool.work/php/8.3/class.mongodb-driver-manager.html
MongoDB\Driver\Exception\CommandException::getResultDocument — Returns the resu... 8203
MongoDB\Driver\Exception\CommandException::getResultDocument (mongodb >= 1.5.0) MongoDB\Driver\Exception\CommandException::getResultDocument — Returns the result document for the failed command 説明 final public function MongoDB\Driver\Exce ... メータ この関数にはパラメータはありません。 戻り値 The result document for the failed command. 参考 MongoDB\Driver\Manager::executeCommand() - Execute a database command 他のマニュアルの関連ページ DuckDB MySQL Import DuckDB ODBC API Overview ...
https://man.mtool.work/php/8.3/mongodb-driver-commandexception.getresultdocument...
PREV 1 2 3 NEXT