mirror of
https://github.com/dg/dibi.git
synced 2025-08-06 06:07:39 +02:00
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2005-2007 David Grudl aka -dgx- <dave@dgx.cz>
|
* Copyright (c) 2005-2007 David Grudl aka -dgx- <dave@dgx.cz>
|
||||||
*
|
*
|
||||||
* @version $Revision: 43 $ $Date: 2007-05-12 00:25:32 +0200 (so, 12 V 2007) $
|
* @version $Revision$ $Date$
|
||||||
* @package dibi
|
* @package dibi
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -123,7 +123,10 @@ class DibiMSSqlDriver extends DibiDriver
|
|||||||
|
|
||||||
public function errorInfo()
|
public function errorInfo()
|
||||||
{
|
{
|
||||||
return FALSE;
|
return array(
|
||||||
|
'message' => NULL,
|
||||||
|
'code' => NULL,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -246,6 +246,7 @@ abstract class DibiResult implements IteratorAggregate, Countable
|
|||||||
{
|
{
|
||||||
@$this->seek(0);
|
@$this->seek(0);
|
||||||
$rec = $this->fetch();
|
$rec = $this->fetch();
|
||||||
|
if (!$rec) return array(); // empty resultset
|
||||||
|
|
||||||
if ($value === NULL) {
|
if ($value === NULL) {
|
||||||
$tmp = array_keys($rec);
|
$tmp = array_keys($rec);
|
||||||
@@ -256,8 +257,6 @@ abstract class DibiResult implements IteratorAggregate, Countable
|
|||||||
if (!array_key_exists($value, $rec)) return FALSE;
|
if (!array_key_exists($value, $rec)) return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$rec) return array(); // empty resultset
|
|
||||||
|
|
||||||
$arr = array();
|
$arr = array();
|
||||||
do {
|
do {
|
||||||
$arr[ $rec[$key] ] = $rec[$value];
|
$arr[ $rec[$key] ] = $rec[$value];
|
||||||
|
Reference in New Issue
Block a user