Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
riculum committed Apr 15, 2022
1 parent 0d9c524 commit ab61731
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea/
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,26 @@ try {
}
```

The `updateAssoc` statement is used to update records in a table using an associative array and a where clause
```php
$data = [
'firstname' => 'John',
'lastname' => 'Doe'
];

$condition = [
'key' => 'id',
'operator' => '=',
'value' => 1
];

try {
$id = DB::updateAssoc('my_table', $data, $condition);
} catch (PDOException $e) {
echo $e->getMessage();
}
```

The `delete` statement is used to delete existing records in a table
```php
try {
Expand Down Expand Up @@ -116,3 +136,15 @@ try {
echo $e->getMessage();
}
```

## Bugreport & Contribution
If you find a bug, please either create a ticket in github, or initiate a pull request

## Versioning
We adhere to semantic (major.minor.patch) versioning (https://semver.org/). This means that:

* Patch (x.x.patch) versions fix bugs
* Minor (x.minor.x) versions introduce new, backwards compatible features or improve existing code.
* Major (major.x.x) versions introduce radical changes which are not backwards compatible.

In your automation or procedure you can always safely update patch & minor versions without the risk of your application failing.

0 comments on commit ab61731

Please sign in to comment.