You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25-17Lines changed: 25 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,22 +15,22 @@
15
15
16
16
## Features
17
17
18
-
***Lightweight** - Portable with only one file.
18
+
***Lightweight** - Single-file framework with minimal dependencies.
19
19
20
-
***Easy** - Easy to learn and use, with a friendly construction.
20
+
***Easy** - Simple and intuitive API for quick integration.
21
21
22
-
***Powerful** - Supports various common and complex SQL queries, data mapping and prevents SQL injection.
22
+
***Powerful** - Supports complex SQL queries, data mapping, and SQL injection prevention.
23
23
24
-
***Compatible** - Supports MySQL, MSSQL, SQLite, MariaDB, PostgreSQL, Sybase, Oracle, and more.
24
+
***Compatible** - Works with MySQL, MariaDB, PostgreSQL, SQLite, MSSQL, Oracle, Sybase, and more.
25
25
26
-
***Friendly** - Works well with every PHP framework, such as Laravel, Codeigniter, Yii, Slim, and frameworks that support singleton extension or composer.
26
+
***Friendly** - Integrates seamlessly with Laravel, CodeIgniter, Yii, Slim, and other PHP frameworks.
27
27
28
-
***Free** - Under the MIT license, you can use it anywhere, for whatever purpose.
28
+
***Free** - Licensed under MIT, free to use for any purpose.
29
29
30
30
## Requirements
31
31
32
-
- PHP 7.3+
33
-
-Installed PDO extension
32
+
- PHP 7.3 or later
33
+
- PDO extension enabled
34
34
35
35
## Get Started
36
36
@@ -41,19 +41,19 @@ Add Medoo to the `composer.json` configuration file.
41
41
$ composer require catfan/medoo
42
42
```
43
43
44
-
And update the composer
44
+
Then update Composer
45
45
```bash
46
46
$ composer update
47
47
```
48
48
49
49
```php
50
-
// Require Composer's autoloader.
50
+
// Require Composer's autoloader
51
51
require 'vendor/autoload.php';
52
52
53
-
// Use the Medoo namespace.
53
+
// Import Medoo namespace
54
54
use Medoo\Medoo;
55
55
56
-
// Connect to the database.
56
+
// Initialize database connection
57
57
$database = new Medoo([
58
58
'type' => 'mysql',
59
59
'host' => 'localhost',
@@ -62,11 +62,13 @@ $database = new Medoo([
62
62
'password' => 'your_password'
63
63
]);
64
64
65
+
// Insert data
65
66
$database->insert('account', [
66
67
'user_name' => 'foo',
67
68
'email' => 'foo@bar.com'
68
69
]);
69
70
71
+
// Retrieve data
70
72
$data = $database->select('account', [
71
73
'user_name',
72
74
'email'
@@ -83,18 +85,24 @@ echo json_encode($data);
83
85
```
84
86
85
87
## Contribution Guidelines
88
+
Before submitting a pull request, ensure compatibility with multiple database engines and include unit tests when possible.
86
89
87
-
Before starting a new pull request, please ensure compatibility with other databases and write unit tests whenever possible.
90
+
### Testing & Code Style
91
+
- Run `phpunit tests` to execute unit tests.
92
+
- Use `php-cs-fixer fix` to enforce code style consistency.
88
93
89
-
Run `phpunit tests` for unit testing and `php-cs-fixer fix` to fix code style.
94
+
### Commit Message Format
95
+
Each commit should begin with a tag indicating the type of change:
90
96
91
-
Each commit should start with a tag indicating the type of change: `[fix]`, `[feature]`, or `[update]`.
0 commit comments