In the code for creating the block we had a couple of lines with data access functions:
$result = $db->sql_query($sql); $numrows = $db->sql_numrows($result); $row = $db->sql_fetchrow($result);
PHP-Nuke uses a 'data abstraction layer', which means that you call functions against an object, which translates them into specific calls against the database of your choice. Generally, MySQL is the database used with PHP-Nuke, but you could choose another database server to power your site. A more pertinent advantage is that you don't need to use database-specific functions to access data in PHP-Nuke; you only need to learn about the functions of the data access object (You will still need to know some SQL to create queries that will be executed on the database).
The code for the data access object is found in the file \db\mysql.php
. In fact, the db
folder contains code for different types of database server, but this file is the one selected by default by PHP-Nuke...