/
newSource.html.php
37 lines (36 loc) · 1.06 KB
/
newSource.html.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
<?php
Layout::extend('layouts/database');
$title = 'New Data Source';
?>
<h1>Adding a New Named Data Source</h1>
<p>Recess allows for multiple named data sources. Currently only MySQL and Sqlite are supported.</p>
<ol>
<li><span class="highlight">Open <?php echo $_ENV['dir.bootstrap']; ?>recess-conf.php</span></li>
<li>Find the <span class="highlight">RecessConf::$namedDatabases</span> variable.</li>
<li>Add a new keyed entry to the $namedDatabasesarray based on your RDBMS:
<ul>
<li><strong class="highlight">MySQL</strong>:
<pre name="code" class="php">
RecessConf::$namedDatabases
= array(
'NAME' => array(
'mysql:host=localhost;dbname=YOUR_DB_NAME',
'MYSQL_USERNAME',
'MYSQL_PASSWORD'),
);
</pre>
</li>
<li><strong class="highlight">Sqlite</strong>:
<pre name="code" class="php">
RecessConf::$namedDatabases
= array(
'NAME' => array('sqlite:PATH/TO/YOUR/DATABASE/database.db'),
);
</pre>
</li>
</ul>
</li>
<li>Save.</li>
</ol>
<hr />
<h3><a href="<?php echo $controller->urlTo('home'); ?>">Return to Data Sources</a></h3>