include_once( "lib/ezdb/classes/ezdb.php" );
$db =& eZDB::instance();
// start a new transaction
$db->begin();
// send the SQL SELECT command to the database
$myquery="SELECT * from course_licenses WHERE userid='$userid'";
$Result['content'] =& $db->arrayQuery($myquery);
// commit the transaction
$db->commit();
The result is now stored in $Result['content']. In my browser I now have a text that says Array where I expected the results.
It's progress, but I guess I need a template to display the content of this array correctly. The only problem is that I'm not sure how I would do that?
I see two possible solutions:
1) Create a node_view.full override and match it against my module and/or view. 2) Create templates for my module in the extension/mymodule/design/standard/templates/mymodule folder.
As you might expect from the name, the arrayQuery method returns an array, meaning that you have to loop through it in the script to get the result you need to return.