Skip to content

Commit ab61731

Browse files
committed
Initial commit
1 parent 0d9c524 commit ab61731

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.idea/

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,26 @@ try {
8181
}
8282
```
8383

84+
The `updateAssoc` statement is used to update records in a table using an associative array and a where clause
85+
```php
86+
$data = [
87+
'firstname' => 'John',
88+
'lastname' => 'Doe'
89+
];
90+
91+
$condition = [
92+
'key' => 'id',
93+
'operator' => '=',
94+
'value' => 1
95+
];
96+
97+
try {
98+
$id = DB::updateAssoc('my_table', $data, $condition);
99+
} catch (PDOException $e) {
100+
echo $e->getMessage();
101+
}
102+
```
103+
84104
The `delete` statement is used to delete existing records in a table
85105
```php
86106
try {
@@ -116,3 +136,15 @@ try {
116136
echo $e->getMessage();
117137
}
118138
```
139+
140+
## Bugreport & Contribution
141+
If you find a bug, please either create a ticket in github, or initiate a pull request
142+
143+
## Versioning
144+
We adhere to semantic (major.minor.patch) versioning (https://semver.org/). This means that:
145+
146+
* Patch (x.x.patch) versions fix bugs
147+
* Minor (x.minor.x) versions introduce new, backwards compatible features or improve existing code.
148+
* Major (major.x.x) versions introduce radical changes which are not backwards compatible.
149+
150+
In your automation or procedure you can always safely update patch & minor versions without the risk of your application failing.

0 commit comments

Comments
 (0)