-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathdatabase_config.php
104 lines (89 loc) · 2.74 KB
/
database_config.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<?php
return [
/*
|--------------------------------------------------------------------------
| PDO Fetch Style
|--------------------------------------------------------------------------
|
| By default, database results will be returned as instances of the PHP
| stdClass object; however, you may desire to retrieve records in an
| array format for simplicity. Here you can tweak the fetch style.
|
*/
'fetch' => PDO::FETCH_OBJ, // for array -> PDO::FETCH_ASSOC
/*
|--------------------------------------------------------------------------
| Default Database Connection Name
|--------------------------------------------------------------------------
|
| Here you may specify which of the database connections below you wish.
*/
'default' => 'mysql',
/*
|--------------------------------------------------------------------------
| Database Connections
|--------------------------------------------------------------------------
|
| Here are each of the database connections setup for your application.
| Of course, examples of configuring each database platform that is
| supported by PHPtricks/database class is shown below to make development simple.
|
|
| All database work in HPtricks/database is done through the PHP PDO facilities
| so make sure you have the driver for your particular database of
| choice installed on your machine before you begin development.
|
*/
'connections' => [
// MySQL 3.x/4.x/5.x
'mysql' => [
'driver' => 'mysql',
'host_name' => 'localhost',
'db_name' => 'booking',
'db_user' => 'homestead',
'db_password' => 'secret'
],
// PostgreSQL
'pgsql' => [
'driver' => 'pgsql',
'host_name' => 'localhost',
'db_name' => 'database_name',
'db_user' => 'database_username',
'db_password' => 'database_user_password'
],
// SQLite
'sqlite' => [
'db_path' => 'my/database/path/database.db',
],
// MS SQL Server
'mssql' => [
'driver' => 'mssql',
'host_name' => 'localhost',
'db_name' => 'database_name',
'db_user' => 'database_username',
'db_password' => 'database_user_password'
],
// MS SQL Server
'sybase' => [
'driver' => 'sybase',
'host_name' => 'localhost',
'db_name' => 'database_name',
'db_user' => 'database_username',
'db_password' => 'database_user_password'
],
// Oracle Call Interface
'oci' => [
'tns' => '
DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = yourip)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)',
'db_user' => 'database_username',
'db_password' => 'database_user_password'
]
]
];