Skip to content

Commit

Permalink
store numeric without quotes, as mysqldump
Browse files Browse the repository at this point in the history
  • Loading branch information
ifsnop committed Jul 5, 2014
1 parent 194383e commit 357ff4e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Ifsnop/Mysqldump/Mysqldump.php
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,12 @@ private function listValues($tablename)
foreach ($resultSet as $r) {
$vals = array();
foreach ($r as $val) {
$vals[] = is_null($val) ? "NULL" :
$this->_dbHandler->quote($val);
if (is_null($val))
$vals[] = "NULL";
else if (ctype_digit($val))
$vals[] = $val;
else
$vals[] = $this->_dbHandler->quote($val);
}
if ($onlyOnce || !$this->_dumpSettings['extended-insert']) {
$lineSize += $this->_compressManager->write(
Expand Down

0 comments on commit 357ff4e

Please sign in to comment.