From ab61731d55171091ef899686f553c016f57c75a6 Mon Sep 17 00:00:00 2001 From: Riculum Date: Fri, 15 Apr 2022 11:46:39 +0200 Subject: [PATCH] Initial commit --- .gitignore | 1 + README.md | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..62c8935 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea/ \ No newline at end of file diff --git a/README.md b/README.md index 0267e32..a0bb383 100644 --- a/README.md +++ b/README.md @@ -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 { @@ -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.