首页
开发手册
应用中心
工具
用户中心
Novices Under FOUNDPHP Use DBO Plug-in to Run the Database
English
中文简体
English
上一篇
下一篇
### DBO Quick Start FoundPHP integrates the DBO class to perform database addition, deletion, modification, and check operations. This class also inherits the advantages of the system and also provides compatibility with the latest version of PHP 5.4-php7, without worrying about stability. ### Database Configuration ```php ``` ##### The database type supports the following types: | DBtype | Description | | -------- | ----- | | mysql | MySQL is the most popular relational database management system| | mysqli | After PHP 5.4, you need to use this method to use MySQL | | sqlite | Lightweight single-file relational database | | sqlite3 | Upgraded version of SQLite | | pgsql | PostgreSQL is a relational database management system with very complete features| | mariadb |MariaDB is a branch database of MySQL | | sqlver | SQLserver Microsoft's database | | redis | Message queue push (first in first out by default) | | Memcached | Memcached cache | ### Start Using the Database ```php $table['a'],'where'=>"id=1")); username //adding data //build insert data $insert_data = array( 'nickname' => 'FoundPHP user',//username 'dates' => time(),//insertion time ); //build data insertion validation conditions $check_data = array( 'nickname' => 'FoundPHP user',//username ); /* table nisert table name data Insert data array('field name'=>'value'; checkData verification array('Verification field name'=>'Verification value') */ sql_update_insert(array('table'=>$table['a'],'data'=>$insert_data,'check'=>$check_data)); //edit data //build and edit data $update_data = array( 'nickname' => 'FoundPHP edit user',//username ); sql_update_insert(array('table'=>$table['a'],'data'=>$update_data,'where'=>'id=1')); //delete data sql_del(array('table'=>$table['a'],'where'=>'id!=1')); //close the database $db->close(); ?> ```