11.2. The syntax of SQL code

Aiming at making PHP-Nuke compatible with more databases, the SQL syntax has been transformed to functions, in order to achieve a standard syntax that is independent of the database used. For convenience, let us recall the file sql_layer.php in a somewhat cleaned-up version:

sql_connect($host, $user, $password, $db) (1)
sql_logout($id) (2)
sql_query($query, $id) (3)
sql_num_rows($res) (4)
sql_fetch_row(&$res, $nr) (5)
sql_fetch_array(&$res, $nr) (6)
sql_fetch_object(&$res, $nr) (7)
sql_free_result($res) (8)
Log into the DB.
Disconnect from the DB.
Number of Rows.
Fetch Rows.
Fetch Array.
Fetch Object.
Free Result.

With this syntax you will be able to render all the modifications, blocks or modules you create compatible to all the databases supported by PHP-Nuke, which are: