-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'refs/remotes/origin/develop'
- Loading branch information
Showing
6 changed files
with
596 additions
and
320 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,15 +10,15 @@ | |
## Main Features | ||
|
||
* **Lightweight** - 26KB around with only one file. | ||
* **Lightweight** - 32KB around with only one file. | ||
|
||
* **Easy** - Extremely easy to learn and use, friendly construction. | ||
|
||
* **Powerful** - Support various common and complex SQL queries, data mapping, and prevent SQL injection. | ||
* **Powerful** - Supports various common and complex SQL queries, data mapping, and prevent SQL injection. | ||
|
||
* **Compatible** - Support all SQL databases, including MySQL, MSSQL, SQLite, MariaDB, Sybase, Oracle, PostgreSQL and more. | ||
* **Compatible** - Supports all SQL databases, including MySQL, MSSQL, SQLite, MariaDB, Sybase, Oracle, PostgreSQL and more. | ||
|
||
* **Friendly** - Work well with every PHP frameworks, like Laravel, Codeigniter, Yii, Slim, and framework which supports singleton extension. | ||
* **Friendly** - Works well with every PHP frameworks, like Laravel, Codeigniter, Yii, Slim, and framework which supports singleton extension. | ||
|
||
* **Free** - Under MIT license, you can use it anywhere if you want. | ||
|
||
|
@@ -53,17 +53,30 @@ $database = new Medoo([ | |
'database_name' => 'name', | ||
'server' => 'localhost', | ||
'username' => 'your_username', | ||
'password' => 'your_password', | ||
'charset' => 'utf8' | ||
'password' => 'your_password' | ||
]); | ||
|
||
// Enjoy | ||
$database->insert('account', [ | ||
'user_name' => 'foo', | ||
'email' => '[email protected]', | ||
'age' => 25, | ||
'lang' => ['en', 'fr', 'jp', 'cn'] | ||
'email' => '[email protected]' | ||
]); | ||
|
||
$data = $database->select('account', [ | ||
'user_name', | ||
'email' | ||
], [ | ||
'user_id' => 50 | ||
]); | ||
|
||
echo json_encode($data); | ||
|
||
// [ | ||
// { | ||
// "user_name" : "foo", | ||
// "email" : "[email protected]", | ||
// } | ||
// ] | ||
``` | ||
|
||
## Contribution Guides | ||
|
@@ -80,6 +93,6 @@ Medoo is under the MIT license. | |
|
||
## Links | ||
|
||
* Official website: [http://medoo.in](http://medoo.in) | ||
* Official website: [https://medoo.in](https://medoo.in) | ||
|
||
* Documentation: [http://medoo.in/doc](http://medoo.in/doc) | ||
* Documentation: [https://medoo.in/doc](https://medoo.in/doc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{ | ||
"name": "catfan/medoo", | ||
"type": "framework", | ||
"description": "The Lightest PHP database framework to accelerate development", | ||
"keywords": ["database", "lightweight", "PHP framework", "SQL", "MySQL", "MSSQL", "SQLite"], | ||
"homepage": "http://medoo.in", | ||
"description": "The lightest PHP database framework to accelerate development", | ||
"keywords": ["database", "lightweight", "PHP framework", "SQL", "MySQL", "MSSQL", "SQLite", "PostgreSQL", "MariaDB", "Oracle"], | ||
"homepage": "https://medoo.in", | ||
"license": "MIT", | ||
"authors": [ | ||
{"name": "Angel Lai", "email": "[email protected]"} | ||
|
@@ -13,12 +13,13 @@ | |
"ext-pdo": "*" | ||
}, | ||
"suggest": { | ||
"ext-pdo_mysql": "For MySQL or MariaDB databases", | ||
"ext-pdo_sqlsrv": "For MSSQL databases on Windows platform", | ||
"ext-pdo_dblib": "For MSSQL or Sybase databases on Linux/UNIX platform", | ||
"ext-pdo_oci": "For Oracle databases", | ||
"ext-pdo_pqsql": "For PostgreSQL databases", | ||
"ext-pdo_sqlite": "For SQLite databases" | ||
"ext-pdo_mysql": "For MySQL or MariaDB database", | ||
"ext-pdo_sqlsrv": "For MSSQL database on Windows platform", | ||
"ext-pdo_dblib": "For MSSQL or Sybase database on Linux/UNIX platform", | ||
"ext-pdo_oci": "For Oracle database", | ||
"ext-pdo_oci8": "For Oracle version 8 database", | ||
"ext-pdo_pqsql": "For PostgreSQL database", | ||
"ext-pdo_sqlite": "For SQLite database" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
|
Oops, something went wrong.