summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoah Heck <noah@noahheck.com>2015-10-25 10:49:03 -0600
committerNoah Heck <noah@noahheck.com>2015-10-25 10:49:03 -0600
commit3778e1aa9fa880b64a7decf35987f1410c7931bb (patch)
tree20ecfb650e05633fdd26bc7465b63c557a7d8650
parent4414231af34c9da654e77f8e27a7d3b93498c5ce (diff)
downloadE_PDOStatement-3778e1aa9fa880b64a7decf35987f1410c7931bb.zip
E_PDOStatement-3778e1aa9fa880b64a7decf35987f1410c7931bb.tar.gz
E_PDOStatement-3778e1aa9fa880b64a7decf35987f1410c7931bb.tar.bz2
Updated documentation/changelog
-rw-r--r--CHANGELOG.md17
-rw-r--r--README.md23
2 files changed, 28 insertions, 12 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 05fc5b8..b619440 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,3 +10,20 @@
- Remove duplication of code for input and bound parameters
- Identified and fixed documentation errors
+
+###2.1.3 (2015-10-24)
+
+####Added
+
+- Full PHPUnit Test Suite
+- Reorganize code to more suitable project structure
+
+###2.1.2 (2015-07-19)
+
+####Added
+
+- Nothing
+
+####Fixed
+
+- Now takes into account bound arguments' datatypes when compiling interpolated string (previously, all values were quoted when it's likely inappropriate to quote INT datatypes). This allows for viewing/using bound values in e.g. LIMIT clauses where the quotes would interfere with processing the resultant query.
diff --git a/README.md b/README.md
index 856a021..7f48fb2 100644
--- a/README.md
+++ b/README.md
@@ -2,14 +2,12 @@
Drop in replacement for default PHP PDOStatement class allowing devs to view an interpolated version of a parameterized query. The result is generally suitable for logging activities, debugging and performance analysis.
-####Update (2015-10-24)
+#####Update (2015-10-24)
Full PHPUnit Test Suite in place plus re-organization of code
-####Update (2015-07-19)
+#####Update (2015-07-19)
Now takes into account bound arguments' datatypes when compiling interpolated string (previously, all values were quoted when it's likely inappropriate to quote INT datatypes). This allows for viewing/using bound values in e.g. LIMIT clauses where the quotes would interfere with processing the resultant query.
-Also, modified namespacing and file structure to allow default composer autoloader to work correctly.
-
##Usage
PHP's PDO are a much improved way for handling database communications, but not being able to view a complete version of the query to be executed on the server after statement parameters have been interpolated can be frustrating.
@@ -107,11 +105,8 @@ $fullQuery = $stmt->interpolateQuery($params);
```
##Installation
-Download the file...put it into a suitable location in your application directory (seriously, it's only one file; 2 if you count the license (Apache) which we all have a copy of lying around somewhere; 3 if you count this).
-### Update
-BONUS FILE NOW INCLUDED - composer.json (because, obviously, composer is a good thing to use).
-Add to your composer.json to have it loaded when you create your project:
+Preferred method: install using composer:
```json
"require" : {
@@ -119,6 +114,8 @@ Add to your composer.json to have it loaded when you create your project:
}
```
+Alternatively, you can simply download the project, put it into a suitable location in your application directory and include into your project as needed.
+
##Configuration
The EPDOStatement class extends the native \PDOStatement object, so the PDO object must be configured to use the extended definition:
@@ -126,12 +123,14 @@ The EPDOStatement class extends the native \PDOStatement object, so the PDO obje
```php
<?php
-require_once "EPDOStatement.php";
-
--- OR --
-
require_once "path/to/vendor/autoload.php";
+/**
+ * -- OR --
+ *
+ * require_once "EPDOStatement.php";
+ */
+
$dsn = "mysql:host=localhost;dbname=myDatabase";
$pdo = new PDO($dsn, $dbUsername, $dbPassword);