File tree 1 file changed +7
-10
lines changed
1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -3,10 +3,6 @@ PDO Database Class
3
3
4
4
A database class for PHP-MySQL which uses the PDO extension.
5
5
6
- ## Feature overview
7
- - Simple fetching
8
- - Logger class
9
-
10
6
## To use the class
11
7
#### 1. Edit the database settings in the settings.ini.php
12
8
```
@@ -27,17 +23,18 @@ require("Db.class.php");
27
23
// The instance
28
24
$db = new Db();
29
25
```
30
- #### 4. Logs - Modify the rights of the logs folder
26
+ #### 4. Logs - Modify the read/write rights of the root folder
27
+
31
28
Everytime an exception is thrown by the database class a log file gets created or modified.
32
- These logs are stored in the logs directory.
29
+ These logs are stored in the logs directory. Which means the database class needs write access for the logs folder.
30
+ If the files are on a webserver you'll have to modify the rights of the root folder otherwise you'll get a "Permission denied" error.
33
31
34
32
The log file is a simple plain text file with the current date('year-month-day') as filename.
35
33
36
- If you want to use these files you''ll have to modify the rights of the logs folder.
37
-
38
34
## Examples
39
-
40
- #### The table persons,
35
+ Below some examples of the basic functions of the database class. I've included a SQL dump so you can easily test the database
36
+ class functions.
37
+ #### The persons table
41
38
| id | firstname | lastname | sex | age
42
39
| :-----------:| :------------:| :------------:| :------------:| :------------:|
43
40
| 1 | John | Doe | M | 19
You can’t perform that action at this time.
0 commit comments