約3,190件1ページ目

日本語のみで絞り込む

The main 'MDB2' class is simply a container class with some static methods for creating DB objects as well as some utility functions common to all parts of DB.

To connect to a database you have to use the function factory(), connect() or singleton(), which require a valid DSN as the first parameter.

PEAR MDB2 is a project to merge PEAR DB and Metabase into one DB abstraction layer. You can get info on these at: PEAR DB: http://pear.php.net Metabase:

2011/6/8 -Other solution is using a Singleton Class to access the database, so that there is a function that always returns the reference to your $mdb2 ...

... MDB2 connection object, or a MDB2 * error object on error * * @access public * @see MDB2::parseDSN */ static function singleton($dsn = null, $options ...

2019/8/21 -In the below examples, $db will refer to the database object that was returned from MDB2::singleton() or I2CE::PDO() or it may refer to those ...

All other files and their containing classes will be included via MDB2::factory() , MDB2::connect() , and MDB2::singleton() . These will load additional classes ...

2023/6/5 -The Singleton pattern can be useful when connecting to a database because it allows you to have a single, shared database connection instance ...

We use the singleton pattern in order to restrict the number of instances that can be created from a resource consuming class to only one.

2022/2/12 -This pattern is used to ensure that there is only one instance of an object and that the same (and single instance) is called everywhere in ...