Skip to content

Commit 672fcfe

Browse files
authored
Fix some grammar mistakes in README.md
1 parent 2cab876 commit 672fcfe

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

README.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
# db-class
2-
This project is a simple database class with php and pdo.
2+
This project is a simple database class with PHP and PDO.
33

44
## Table of Contents
55
1. [Requirements](#requirements)
66
2. [Installation](#installation)
7-
1. [Using Composer (recommended)](#using-composer-recommended)
8-
2. [Manual Installation](#manual-installation)
7+
1. [Using Composer (recommended)](#using-composer-recommended)
8+
2. [Manual Installation](#manual-installation)
99
3. [Basic Usage](#basic-usage)
10-
1. [Namespace](#namespace)
11-
2. [Instantiate Class / Connect to Database (`__construct()`)](#instantiate-class--connect-to-database-__construct)
12-
3. [Check Connection to Database (`connected()`)](#check-connection-to-database-connected)
13-
4. [Select/Get Data from Database (`select()`)](#selectget-data-from-database-select)
14-
5. [Insert Data into Database (`insert()`)](#insert-data-into-database-insert)
15-
6. [Delete Data/Rows from Database (`delete()`)](#delete-datarows-from-database-delete)
16-
7. [Update Data in Database (`update()`)](#update-data-in-database-update)
17-
8. [Configure Error Handling (`initErrorHandler()`)](#configure-error-handling-initerrorhandler)
18-
9. [Check for Errors (`error()`)](#check-for-errors-error)
19-
10. [Get Errors (`getError()`)](#get-errors-geterror)
10+
1. [Namespace](#namespace)
11+
2. [Instantiate Class / Connect to Database (`__construct()`)](#instantiate-class--connect-to-database-__construct)
12+
3. [Check Connection to Database (`connected()`)](#check-connection-to-database-connected)
13+
4. [Select/Get Data from Database (`select()`)](#selectget-data-from-database-select)
14+
5. [Insert Data into Database (`insert()`)](#insert-data-into-database-insert)
15+
6. [Delete Data/Rows from Database (`delete()`)](#delete-datarows-from-database-delete)
16+
7. [Update Data in Database (`update()`)](#update-data-in-database-update)
17+
8. [Configure Error Handling (`initErrorHandler()`)](#configure-error-handling-initerrorhandler)
18+
9. [Check for Errors (`error()`)](#check-for-errors-error)
19+
10. [Get Errors (`getError()`)](#get-errors-geterror)
2020
4. [Further Examples / Stuff for Testing](#further-examples--stuff-for-testing)
2121
5. [Contributing](#contributing)
2222
6. [License](#license)
@@ -134,7 +134,7 @@ select(string $sql, array $where=null, int $fetch_mode=PDO::FETCH_ASSOC)
134134
The following arguments exist:
135135

136136
#### SQL Query (`$sql`)
137-
The sql to perform the query to the database. (required)
137+
The SQL to perform the query to the database. (required)
138138

139139
For example:
140140

@@ -152,7 +152,7 @@ Example:
152152
[ 'username' => 'Jack' ]
153153
```
154154

155-
Please note that you have to provide an associative array with keys that match to the placeholders in the sql query, unless you are not using the named placeholders in the query. In case you are just using the question marks as the placeholder, you can get rid of the keys.
155+
Please note that you have to provide an associative array with keys that match to the placeholders in the SQL query unless you are not using the named placeholders in the query. In case you are just using the question marks as the placeholder, you can get rid of the keys.
156156

157157
#### PDO Fetch Mode (`$fetch_mode`)
158158
The [pdo fetch mode](http://php.net/manual/en/pdostatement.fetch.php). Defines in which format the data is returned from the database. (optional)
@@ -181,7 +181,7 @@ insert(string $sql, array $values)
181181
The following arguments are required when calling the method:
182182

183183
#### SQL Query (`$sql`)
184-
The sql query to insert the data into your database. (required)
184+
The SQL query to insert the data into your database. (required)
185185

186186
For example that could be:
187187

@@ -201,7 +201,7 @@ Example:
201201
]
202202
```
203203

204-
Please note that you have to provide an associative array with keys that match to the placeholders in the sql query, unless you are not using the named placeholders in the query. In case you are just using the question marks as the placeholder, you can get rid of the keys.
204+
Please note that you have to provide an associative array with keys that match to the placeholders in the SQL query unless you are not using the named placeholders in the query. In case you are just using the question marks as the placeholder, you can get rid of the keys.
205205

206206
Finally, here is an example for using the `insert()` method to insert data into your database:
207207

@@ -227,7 +227,7 @@ delete(string $sql, array $where=null)
227227
These are the existing arguments:
228228

229229
#### SQL Query (`$sql`)
230-
The sql query to delete the data from the database. (required)
230+
The SQL query to delete the data from the database. (required)
231231

232232
For example:
233233

@@ -246,7 +246,7 @@ Example:
246246
[ 'id' => 3 ]
247247
```
248248

249-
Please note that you have to provide an associative array with keys that match to the placeholders in the sql query, unless you are not using the named placeholders in the query. In case you are just using the question marks as the placeholder, you can get rid of the keys.
249+
Please note that you have to provide an associative array with keys that match to the placeholders in the SQL query unless you are not using the named placeholders in the query. In case you are just using the question marks as the placeholder, you can get rid of the keys.
250250

251251
Simple example for deleting data with this method:
252252

@@ -263,17 +263,17 @@ update(string $sql, array $values)
263263

264264
The method has the following return values:
265265

266-
`true`: Everything has been updated successfully
266+
`true`: Everything has been updated successfully
267267

268-
`0`: The query has been executed successfully, but no rows have been affected by it.
268+
`0`: The query has been executed successfully, but no rows have been affected by it.
269269

270-
`false`: The query is completely failed.
270+
`false`: The query is completely failed.
271271

272272

273273
That leads to the following arguments:
274274

275275
#### SQL Query (`$sql`)
276-
The sql query to update the data in your database. (required)
276+
The SQL query to update the data in your database. (required)
277277

278278
Example:
279279

@@ -293,7 +293,7 @@ For example that could be the following:
293293
]
294294
```
295295

296-
Please note that you have to provide an associative array with keys that match to the placeholders in the sql query, unless you are not using the named placeholders in the query. In case you are just using the question marks as the placeholder, you can get rid of the keys.
296+
Please note that you have to provide an associative array with keys that match to the placeholders in the SQL query unless you are not using the named placeholders in the query. In case you are just using the question marks as the placeholder, you can get rid of the keys.
297297

298298
Example for using everything this method has to offer together:
299299

@@ -311,7 +311,7 @@ $updated = $db->update(
311311

312312
If you want to, you can create your own error handling setup before you instantiate the class.
313313

314-
Important to know is that every method returns the array `$error` on failure with some basic information about the error that is occured.
314+
Important to know is that every method returns the array `$error` on failure with some basic information about the error that is occurred.
315315

316316
The following options exist:
317317

@@ -339,7 +339,7 @@ Default:
339339

340340
**Attention**: Do not change the error codes/keys as long as you don't modify the class according to that! When you change the error code of an error and then just use the database class as normal, it will not work as expected!
341341

342-
Besides from that you can freely change the error messages to your own liking.
342+
Besides from that, you can freely change the error messages to your own liking.
343343

344344
To change the config of the error handling, you must call the static method `initErrorHandler(string $env='production', array $error_types=[])`, which will basically set your specified configs, **before** you are instantiating the class.
345345

@@ -361,7 +361,7 @@ DB::initErrorHandler(
361361
Always make sure to pass in the whole array, e.g. not just error 2 and 5, because then only error 2 and 5 will exist.
362362

363363
### Check for Errors (`error()`)
364-
In case you want to know if an error occured, you can simply call the method `error()` and it will return you `true` or `false` based on the fact whether there is an error or not.
364+
In case you want to know if an error occurred, you can simply call the method `error()` and it will return you `true` or `false` based on the fact whether there is an error or not.
365365

366366
Example for using that:
367367

@@ -393,15 +393,15 @@ echo $db->getError()['msg'];
393393
## Further Examples / Stuff for Testing
394394
You want to see further examples for using the database class or you just want to play around with it a little bit?
395395

396-
- You can find a further examples in the file [`example.php`](https://github.com/jr-cologne/db-class/blob/master/example/example.php).
396+
- You can find further examples in the file [`example.php`](https://github.com/jr-cologne/db-class/blob/master/example/example.php).
397397
- To play around with the database class, you can use the database provided in the file [`db-class-example.sql`](https://github.com/jr-cologne/db-class/blob/master/example/db-class-example.sql). Just import that in your database client and you are ready to start!
398398

399399
## Contributing
400400
Feel free to contribute to this project! It would be awesome for me if somebody contributes to it.
401401

402-
So don't be shy and start coding! If you want to make sure that I like your idea, you can contact me by a Issue.
402+
So don't be shy and start coding! If you want to make sure that I like your idea, you can contact me by an Issue.
403403

404-
But if you decide to contribute to this project, keep in mind that finally it is my choice to merge your Pull Request or not, so also be prepared for a negative decision.
404+
But if you decide to contribute to this project, keep in mind that finally, it is my choice to merge your Pull Request or not, so also be prepared for a negative decision.
405405

406406
## License
407407
This project is licensed under the [MIT License](https://github.com/jr-cologne/db-class/blob/master/LICENSE).

0 commit comments

Comments
 (0)