mirror of
https://github.com/dg/dibi.git
synced 2025-09-04 03:35:26 +02:00
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
6f99db544f | ||
|
c399d79ab8 | ||
|
67f8468a38 | ||
|
72944ae012 | ||
|
4843882e61 | ||
|
669ce73096 | ||
|
6e4a6474cd |
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
/vendor
|
||||||
|
/composer.lock
|
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "dg/dibi",
|
"name": "dibi/dibi",
|
||||||
"description": "Dibi is Database Abstraction Library for PHP 5.",
|
"description": "Dibi is Database Abstraction Library for PHP 5.",
|
||||||
"keywords": ["dibi", "database", "dbal", "mysql", "postgresql", "sqlite", "mssql", "oracle", "access", "pdo", "odbc"],
|
"keywords": ["database", "dbal", "mysql", "postgresql", "sqlite", "mssql", "oracle", "access", "pdo", "odbc"],
|
||||||
"homepage": "http://dibiphp.com/",
|
"homepage": "http://dibiphp.com/",
|
||||||
"license": ["BSD-3", "GPLv2", "GPLv3"],
|
"license": ["BSD-3", "GPLv2", "GPLv3"],
|
||||||
"authors": [
|
"authors": [
|
||||||
|
@@ -80,7 +80,7 @@ class dibi
|
|||||||
FIELD_TIME = dibi::TIME;
|
FIELD_TIME = dibi::TIME;
|
||||||
|
|
||||||
/** version */
|
/** version */
|
||||||
const VERSION = '2.0.2',
|
const VERSION = '2.0.3',
|
||||||
REVISION = '$WCREV$ released on $WCDATE$';
|
REVISION = '$WCREV$ released on $WCDATE$';
|
||||||
|
|
||||||
/** sorting order */
|
/** sorting order */
|
||||||
|
@@ -194,7 +194,7 @@ class DibiMySqliDriver extends DibiObject implements IDibiDriver, IDibiResultDri
|
|||||||
*/
|
*/
|
||||||
public function getAffectedRows()
|
public function getAffectedRows()
|
||||||
{
|
{
|
||||||
return mysqli_affected_rows($this->connection);
|
return mysqli_affected_rows($this->connection) === -1 ? FALSE : mysqli_affected_rows($this->connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -451,7 +451,10 @@ class DibiPdoDriver extends DibiObject implements IDibiDriver, IDibiResultDriver
|
|||||||
}
|
}
|
||||||
// PHP < 5.2.3 compatibility
|
// PHP < 5.2.3 compatibility
|
||||||
// @see: http://php.net/manual/en/pdostatement.getcolumnmeta.php#pdostatement.getcolumnmeta.changelog
|
// @see: http://php.net/manual/en/pdostatement.getcolumnmeta.php#pdostatement.getcolumnmeta.changelog
|
||||||
$row['table'] = isset($row['table']) ? $row['table'] : NULL;
|
$row = $row + array(
|
||||||
|
'table' => NULL,
|
||||||
|
'native_type' => 'VAR_STRING',
|
||||||
|
);
|
||||||
|
|
||||||
$columns[] = array(
|
$columns[] = array(
|
||||||
'name' => $row['name'],
|
'name' => $row['name'],
|
||||||
|
@@ -338,6 +338,7 @@ class DibiConnection extends DibiObject
|
|||||||
{
|
{
|
||||||
$this->connected || $this->connect();
|
$this->connected || $this->connect();
|
||||||
|
|
||||||
|
dibi::$sql = $sql;
|
||||||
$event = $this->onEvent ? new DibiEvent($this, DibiEvent::QUERY, $sql) : NULL;
|
$event = $this->onEvent ? new DibiEvent($this, DibiEvent::QUERY, $sql) : NULL;
|
||||||
try {
|
try {
|
||||||
$res = $this->driver->query($sql);
|
$res = $this->driver->query($sql);
|
||||||
|
@@ -514,7 +514,7 @@ class DibiResult extends DibiObject implements IDataSource
|
|||||||
$row[$key] = is_float($tmp = $value * 1) ? $value : $tmp;
|
$row[$key] = is_float($tmp = $value * 1) ? $value : $tmp;
|
||||||
|
|
||||||
} elseif ($type === dibi::FLOAT) {
|
} elseif ($type === dibi::FLOAT) {
|
||||||
$row[$key] = (string) ($tmp = (float) $value) === $value ? $tmp : $value;
|
$row[$key] = (string) ($tmp = (float) $value) === rtrim(rtrim($value, '0'), '.') ? $tmp : $value;
|
||||||
|
|
||||||
} elseif ($type === dibi::BOOL) {
|
} elseif ($type === dibi::BOOL) {
|
||||||
$row[$key] = ((bool) $value) && $value !== 'f' && $value !== 'F';
|
$row[$key] = ((bool) $value) && $value !== 'f' && $value !== 'F';
|
||||||
|
@@ -1 +1 @@
|
|||||||
Dibi 2.0.2 (revision $WCREV$ released on $WCDATE$)
|
Dibi 2.0.3 (revision $WCREV$ released on $WCDATE$)
|
||||||
|
Reference in New Issue
Block a user