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: dbObject.md
+6-5Lines changed: 6 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
-
dbObject - model implementation on top of the MysqliDb
2
-
Please note, that this library is not pretending to be a full stack ORM but a simple OOP wrapper for mysqlidb
1
+
dbObject - model implementation on top of the MysqliDb.
2
+
3
+
Please note that this library is not pretending to be a full stack ORM, but simply an OOP wrapper for `mysqlidb`.
3
4
4
5
<hr>
5
6
###Initialization
@@ -26,7 +27,7 @@ class user extends dbObject {}
26
27
```
27
28
In case autoload is set to 'models' directory, the filename should be models/user.php
28
29
29
-
Class will be related to 'user' table. To change table name define correct name in the $dbTable variable:
30
+
Class will be related to 'user' table. To change the table name, define correct name in the `$dbTable` variable:
30
31
31
32
```php
32
33
protected $dbTable = "users";
@@ -110,11 +111,11 @@ $p->seller = $user;
110
111
$p->save();
111
112
```
112
113
113
-
After `save()` is called both new objects (user and product) will be saved.
114
+
After `save()` is called, both new objects (user and product) will be saved.
114
115
115
116
116
117
###Update
117
-
To update model properties just set them and call `save()` method. As well values that needed to by changed could be passed as an array to the `save()` method.
118
+
To update model properties just set them and call `save()` method. Values that need to be changed could be passed as an array to the `save()` method as well.
0 commit comments