Step 3: using the dbl
The dbl can fetch data, you can fetch it anytime, anywhere, using the same connection. Getting the database layer is easy when it is registered with zen instance manager, It's like the Java Naming and Directory Information service but only on a much much smaller scale ;)Later on we will use this to initialise our model.
| datasetup.php |
<?php
$dbl = zen::getInstanceOf('dbl');
/* copies the entire table courses to the array, no special options */
$courses = $dbl->fetchTemplateArray($dbl->select('courses'));
?> |