SyndeoCMS Content management system for primary schools

Content Management System for Primary Schools

General info arrowMysql to Mysqli
Sunday, 25 March 2018

Migration from MYSQL to MYSQLI functions

In the future the php mysql functions will be deprecated and so we have implemented mysqli functions in Syndeocms 3.2.
This means that before you migrate to 3.2 you have to change your own template code.

Syntax for mysql and mysqli Functions:
mysqli Function mysql Function
mysqli_connect($db_server, $db_username, $db_password, $db_name) mysql_connect($db_server, $db_username, $db_password) followed by
mysqli_errno($db) mysql_errno() or mysql_errno($db)
mysqli_error($db) mysql_error() or mysql_error($db)
mysqli_fetch_array($result) mysql_fetch_array($result)
mysqli_fetch_assoc($result) mysql_fetch_assoc($result)
mysqli_fetch_row($result) mysql_fetch_row($result)
mysqli_insert_id($db) mysql_insert_id($db)
mysqli_num_rows($result) mysql_num_rows($result)
mysqli_query($db,$query) mysql_query($query) or
mysqli_select_db($db,$dbname) mysql_select_db($dbname)
mysqli_real_escape_string($db,$data) mysql_real_escape_string($data)

If you use a editor like notepad++ you can do following replaces:
mysql by mysqli
mysqli_query( by mysqli_query($db,
Latest news
Version 3.2 released!
read more ...

Version 3.1.00 released!
read more ...

Professional editon
For SyndeoCMS Professional Edition please visit our strategic partners:

To see an overview of the differences between the Open- and the Professional version click Here.
Top! Top!