Medoo is a lightweight PHP database framework class that accelerates website development! Medoo can greatly speed up the development of your PHP project. In web development, a large part of the enterprise or individual will choose to use the PHP language, and Medoo can play a icing on the cake. Shorten your development cycle. Medoo's powerful and sophisticated API not only fits your most basic needs, but is also very simple to use. Even if you have to develop two times, there is no problem.
First, Medoo environmental needs
(1), PHP 5.1 or above and enable PDO support
(2), support Mysql,mssql,sqlite database, or more other databases.
(3), ensure that the database PDO extension is installed and enabled in PHP.ini.
Second, the use of Medoo
(1), MySQL in Medoo use
require ' medoo.php ';
$database = new Medoo (Array (
Must-Choose
' Database_type ' = ' mysql ',
' database_name ' = ' name ',
' Server ' = ' localhost ',
' Username ' = ' your_username ',
' Password ' = ' Your_password ',
Options available
' Port ' = 3306,
' CharSet ' = ' utf8 ',
DB connection Drive Options
' option ' = = Array (
Pdo::attr_case = Pdo::case_natural
)));
(2), Medoo use in SQLite
Require_once ' medoo.php ';
$database = new Medoo ([
' Database_type ' = ' SQLite ',
' Database_file ' = ' my/database/path/database.db ']
);
$database->insert ("Account", [
"User_name" = "foo",
"Email" = "foo@bar.com"]
);
Project Address: http://medoo.in/