Assume phalcon devtools is in your $PATH, a valid hosts entry for your application domain, an apache vhost mapped to your hosts file entry, and a database, host, user and password exist.
1 - phalcon create-project projectname
2 - cd projectname
3 - at this point update /app/config/config.php with you Data Source Name connectivity details
4 - *phalcon scaffold projects creates models, controllers and views for projects
5 - Inside an action within the ProjectsController.php
// Define a SQL string query
$qry = 'SELECT * FROM projects';
// Run query with fetchAll and add it to a view template available as $projects
$this->view->projects = $this->db->fetchAll($qry);
Question: 1) What is the best practice for PDO SQL query location in an application? I don't think they should live in the Controller. I will be looking at creating a Class that contains a list of methods for complex data manipulations.