Tutorial: how to use the database
<?php
// database usage example
// activate the Drake CMS core
require 'core.php';
// get a resultset array (associative) with the id and title of published content items
$rsa = $conn->SelectArray('#__content', 'id,title', ' WHERE published=1');
// display the resultset array
echo '<pre>';
var_dump($rsa);
echo '</pre>;
// get a resultset array with the title of published content items in a flat array
$titles = $conn->SelectColumn('#__content', 'title', ' WHERE published=1');
// display the flat array
echo '<pre>';
var_dump($titles);
echo '</pre>;
?>