Notice: Undefined offset: 8192 in /home/miphpf/domains/miphpf.com/public_html/includes/common.inc on line 499

Notice: Undefined offset: 8192 in /home/miphpf/domains/miphpf.com/public_html/includes/common.inc on line 506

Warning: Incorrect key file for table './miphpf_miphpfcom/watchdog.MYI'; try to repair it query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', 'preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/miphpf/domains/miphpf.com/public_html/includes/unicode.inc on line 291.', 2, '', 'http://www.miphpf.com/manual/database_introduction.html', '', '3.15.219.217', 1713913630) in /home/miphpf/domains/miphpf.com/public_html/includes/database.mysql.inc on line 121
Working with the database | MIPHPF - Your Open Source RAD PHP Framework
Skip navigation.
Home

Working with the database

: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/miphpf/domains/miphpf.com/public_html/includes/unicode.inc on line 291.

The database is abstracted into a pair of classes - miDBUtilImpl and miStaticDBUtil. The miDBUtilImpl has a number of methods for accessing the database and performing queries.
The miStaticDBUtil implements the proxy design pattern by duplicating all methods of miDBUtilImpl. There is no need to instantiate the miDBUtilImpl object, as it will be created implicitly by miStaticDBUtil.

By default database objects are working with the database configuration defined in the config.inc file.

Here is an example usage:

<?php
miStaticDBUtil
::execQuery('UPDATE Example SET ExampleColumn = 1');
?>