summaryrefslogtreecommitdiff
path: root/adodb.inc.php
diff options
context:
space:
mode:
authorMark Newnham <mark@newnhams.com>2015-10-25 16:00:02 -0600
committerMark Newnham <mark@newnhams.com>2015-10-25 16:00:02 -0600
commit2e72fe524694d30a97a760a43b6d1554d8d84e0a (patch)
tree25df778beaf345a906c54e5811b223c422b3f5fd /adodb.inc.php
parentdb2010ced00e1586d461b44c1622f9ef66557b14 (diff)
downloadadodb-2e72fe524694d30a97a760a43b6d1554d8d84e0a.tar.gz
adodb-2e72fe524694d30a97a760a43b6d1554d8d84e0a.tar.bz2
adodb-2e72fe524694d30a97a760a43b6d1554d8d84e0a.zip
new public method setConnectionParameter fixes https://github.com/ADOdb/ADOdb/pull/158
Diffstat (limited to 'adodb.inc.php')
-rw-r--r--adodb.inc.php27
1 files changed, 26 insertions, 1 deletions
diff --git a/adodb.inc.php b/adodb.inc.php
index cae3bd75..b0939da4 100644
--- a/adodb.inc.php
+++ b/adodb.inc.php
@@ -503,7 +503,32 @@ if (!defined('_ADODB_LAYER')) {
var $_affected = false;
var $_logsql = false;
var $_transmode = ''; // transaction mode
-
+
+ /*
+ * Additional parameters that may be passed to drivers in the connect string
+ * Driver must be coded to accept the parameters
+ */
+ protected $connectionParameters = array();
+
+ /**
+ * Adds a parameter to the connection string.
+ *
+ * These parameters are added to the connection string when connecting,
+ * if the driver is coded to use it.
+ *
+ * @param string $parameter The name of the parameter to set
+ * @param string $value The value of the parameter
+ *
+ * @return null
+ *
+ * @example, for mssqlnative driver ('CharacterSet','UTF-8')
+ */
+ final public function setConnectionParameter($parameter,$value)
+ {
+
+ $this->connectionParameters[$parameter] = $value;
+
+ }
static function Version() {
global $ADODB_vers;