mirror of
https://github.com/dg/dibi.git
synced 2025-08-04 21:28:02 +02:00
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
require_once '../dibi/dibi.php';
|
||||
|
||||
// using DSN
|
||||
// connects using DSN
|
||||
$state = dibi::connect('driver=mysql&host=localhost&username=root&password=xxx&database=test&charset=utf8');
|
||||
|
||||
|
||||
@@ -25,6 +25,21 @@ dibi::connect(array(
|
||||
));
|
||||
*/
|
||||
|
||||
/* connects to SQlite
|
||||
dibi::connect(array(
|
||||
'driver' => 'sqlite',
|
||||
'database' => 'mydb.sdb',
|
||||
));
|
||||
*/
|
||||
|
||||
/* connects to PostgreSql
|
||||
dibi::connect(array(
|
||||
'driver' => 'postgre',
|
||||
'string' => 'host=localhost port=5432 dbname=mary',
|
||||
'persistent' => TRUE,
|
||||
));
|
||||
*/
|
||||
|
||||
|
||||
// check status
|
||||
if (!dibi::isConnected()) {
|
||||
|
Reference in New Issue
Block a user