Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/unaio/una
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonLV committed Sep 15, 2017
2 parents 1fe5d93 + 5aa1839 commit 6e305f7
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions inc/classes/BxDolDb.php
Original file line number Diff line number Diff line change
Expand Up @@ -1016,14 +1016,17 @@ protected function executeStatement($oStatement, $aBindings = array(), $bVerbose
{
$bResult = false;

foreach($aBindings as $sKey => $mixedValue) {
if(is_null($mixedValue))
$oStatement->bindValue(":{$sKey}", $mixedValue, PDO::PARAM_NULL);
else if(is_numeric($mixedValue))
$oStatement->bindValue(":{$sKey}", $mixedValue, PDO::PARAM_INT);
else
$oStatement->bindValue(":{$sKey}", $mixedValue, PDO::PARAM_STR);
}
if (!isset($aBindings[0])) {
foreach($aBindings as $sKey => $mixedValue) {
if(is_null($mixedValue))
$oStatement->bindValue(":{$sKey}", $mixedValue, PDO::PARAM_NULL);
else if(is_numeric($mixedValue))
$oStatement->bindValue(":{$sKey}", $mixedValue, PDO::PARAM_INT);
else
$oStatement->bindValue(":{$sKey}", $mixedValue, PDO::PARAM_STR);
}
$aBindings = array();
}

switch (self::$_rLink->getAttribute(PDO::ATTR_ERRMODE)) {
case PDO::ERRMODE_SILENT:
Expand Down

0 comments on commit 6e305f7

Please sign in to comment.