mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
Issue 1634:change to return empty array() from return null on returned data of query result.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10386 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
ac56406b22
commit
41e828e8b5
3 changed files with 6 additions and 4 deletions
|
|
@ -179,7 +179,8 @@
|
|||
**/
|
||||
function _fetch($result, $arrayIndexEndValue = NULL)
|
||||
{
|
||||
if (!$this->isConnected() || $this->isError() || !$result) return;
|
||||
$output = array();
|
||||
if (!$this->isConnected() || $this->isError() || !$result) return array();
|
||||
|
||||
// TODO Improve this piece of code
|
||||
// This code trims values from char type columns
|
||||
|
|
|
|||
|
|
@ -170,11 +170,11 @@
|
|||
* @brief Fetch results
|
||||
**/
|
||||
function _fetch($result, $arrayIndexEndValue = NULL) {
|
||||
if(!$this->isConnected() || $this->isError() || !$result) return;
|
||||
$output = array();
|
||||
if(!$this->isConnected() || $this->isError() || !$result) return $output;
|
||||
|
||||
$c = sqlsrv_num_fields($result);
|
||||
$m = null;
|
||||
$output = array();
|
||||
|
||||
while(sqlsrv_fetch($result)){
|
||||
if(!$m) $m = sqlsrv_field_metadata($result);
|
||||
|
|
|
|||
|
|
@ -147,7 +147,8 @@
|
|||
* @brief Fetch results
|
||||
**/
|
||||
function _fetch($result, $arrayIndexEndValue = NULL) {
|
||||
if(!$this->isConnected() || $this->isError() || !$result) return;
|
||||
$output = array();
|
||||
if(!$this->isConnected() || $this->isError() || !$result) return $output;
|
||||
while($tmp = $this->db_fetch_object($result)) {
|
||||
if($arrayIndexEndValue) $output[$arrayIndexEndValue--] = $tmp;
|
||||
else $output[] = $tmp;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue