Why Choose Medoo?
-Very light weight
Only 15KB, just include.
-Simple
Very easy to learn, quick to get started.
-Powerful
supports a variety of common SQL queries.
-compatible
supports a variety of data: MySQL, MSSQL, SQLite, MariaDB, Oracle, Sybase, PostgreSQL.
-Safety
Prevent SQL injection
-Free
MIT protocol, you can make any changes.
Must be PHP 5.1 or more, very, very special, extremely, highly recommended: Use PHP 5.4 or later and turn on PDO support. You can install databases such as Mysql,mssql,sqlite, or more.
Note: In PHP 5.4+, you can use [] as an abbreviated syntax for an array. All Medoo sample code uses [] to replace array ().
Download medoo.min.php, put it in the right directory, start using it, it's so easy!
Official tutorial: Http://medoo.in/api/new
The Chinese can be consulted: http://medoo.lvtao.net/doc.php
Methods for standalone configuration
Require ' medoo.php ';
$database = new Medoo ([
Required
' Database_type ' = ' mysql ',
' database_name ' = ' name ',
' Server ' = ' localhost ',
' Username ' = ' your_username ',
' Password ' = ' Your_password ',
' CharSet ' = ' utf8 ',
Optional
' Port ' = 3306,
Driver_option for connection, read more from http://www.php.net/manual/en/pdo.setattribute.php
' option ' = [
Pdo::attr_case = Pdo::case_natural
]
]);
$database->insert ("Account", [
"User_name" = "foo",
"Email" = "[email protected]"
]);
Accelerated development of the lightest PHP database framework Medoo