Commit 84a3f5d
authored
Update connect.php
PDO Settings via Array: PDO settings are passed as an array directly in the PDO constructor instead of setAttribute. This makes for shorter, cleaner writing.
Exit Function Usage: exit is used instead of die, reflecting a more modern PHP usage.
Default Retrieval Mode: PDO::FETCH_OBJ is set as the default retrieval mode so data will be returned as object. This makes your code a little cleaner and makes data manipulation easier (optional).1 parent b590b5f commit 84a3f5d
1 file changed
+9
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
0 commit comments