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)
(1)
Log into the DB.
(2)
Disconnect from the DB.
(3)
Query.
(4)
Number of Rows.
(5)
Fetch Rows.
(6)
Fetch Array.
(7)
Fetch Object.
(8)
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:

Hosting by: Hurra Communications Ltd.
Generated: 2007-01-26 17:57:55