These functions are used throughout SMF code in order to deal with different versions of php, different character sets, and different databases.
General Utility Functions
These functions are defined in function reloadSettings, in Load.php. Some of these functions have the same name as standard PHP functions, but were designed to deal uniformly with UTF-8 character sets, HTML entities, and differences in behavior in different versions of PHP. It is recommended that they be used instead of the functions they replace. {{#ask: |sort=SMC_order_position,SMC_function |order=ascending,ascending |format=template |template=smcFunc_ulist |?SMC_function=function }}
Database Functions
In SMF 2.0, multiple database support was introduced. This was implemented by developers as a new layer of database functions along with a new security model, which provides a fast and secure method to work across database systems. Below is a list of the database functions that currently exist in 2.0. Each of these links will direct you towards a section about that function that will help you understand what each one does, how its input is expected and if possible, the exact duplicate function for mysql. An example is provided as well for most of these, these examples come straight from the SMF Source code.
Please note our Function Database now has the latest SMF 2.0 functions for your information and may help in explaining the functions. They do not use the $smcFunc variables that this guide does. For most of your functions you will see "smf_db_xxx" where xxx is the function name such as "smf_db_insert" that is used by $smcFunc['db_insert'].
{{#ask: |format=template |template=smcFunc_list |introtemplate=smcFunc_list_header |outrotemplate=smcFunc_list_footer |sort=SMC_order_position,SMC_function |order=ascending,ascending |?SMC_function=function |?SMC_usage_exm=usage |?SMC_description_text=description |?SMC_parameters=parameters }}
Database Package Functions
{{#ask: |format=template |template=smcFunc_list |introtemplate=smcFunc_list_header |outrotemplate=smcFunc_list_footer |sort=SMC_order_position,SMC_function |order=ascending,ascending |?SMC_function=function |?SMC_usage_exm=usage |?SMC_description_text=description |?SMC_parameters=parameters }}