Vergleich inc/db_pgsql.php - 1.8.23 - 1.8.29

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 181Zeile 181
			}
}


			}
}


		$this->db_encoding = $config['encoding'];




		if(isset($config['encoding']))
{
$this->db_encoding = $config['encoding'];
}


// Actually connect to the specified servers
foreach(array('read', 'write') as $type)


// Actually connect to the specified servers
foreach(array('read', 'write') as $type)

Zeile 219Zeile 222
				if(strpos($single_connection['hostname'], ':') !== false)
{
list($single_connection['hostname'], $single_connection['port']) = explode(':', $single_connection['hostname']);

				if(strpos($single_connection['hostname'], ':') !== false)
{
list($single_connection['hostname'], $single_connection['port']) = explode(':', $single_connection['hostname']);

 
				}
else
{
$single_connection['port'] = null;

				}

if($single_connection['port'])

				}

if($single_connection['port'])

Zeile 278Zeile 285

/**
* Query the database.


/**
* Query the database.

	 *
* @param string $string The query SQL.
* @param boolean|int $hide_errors 1 if hide errors, 0 if not.

	 *
* @param string $string The query SQL.
* @param boolean|int $hide_errors 1 if hide errors, 0 if not.

	 * @param integer $write_query 1 if executes on slave database, 0 if not.
* @return resource The query data.
*/

	 * @param integer $write_query 1 if executes on slave database, 0 if not.
* @return resource The query data.
*/

Zeile 346Zeile 353
	function write_query($query, $hide_errors=0)
{
return $this->query($query, $hide_errors, 1);

	function write_query($query, $hide_errors=0)
{
return $this->query($query, $hide_errors, 1);

	}

	}


/**
* Explain a query on the database.


/**
* Explain a query on the database.

Zeile 412Zeile 419
	 * @return array The array of results. Note that all fields are returned as string: http://php.net/manual/en/function.pg-fetch-array.php
*/
function fetch_array($query, $resulttype=PGSQL_ASSOC)

	 * @return array The array of results. Note that all fields are returned as string: http://php.net/manual/en/function.pg-fetch-array.php
*/
function fetch_array($query, $resulttype=PGSQL_ASSOC)

	{

	{

		switch($resulttype)
{
case PGSQL_NUM:

		switch($resulttype)
{
case PGSQL_NUM:

Zeile 421Zeile 428
			default:
$resulttype = PGSQL_ASSOC;
break;

			default:
$resulttype = PGSQL_ASSOC;
break;

		}

$array = pg_fetch_array($query, NULL, $resulttype);


		}

$array = pg_fetch_array($query, NULL, $resulttype);


		return $array;
}


		return $array;
}


Zeile 441Zeile 448
		if($row === false)
{
$array = $this->fetch_array($query);

		if($row === false)
{
$array = $this->fetch_array($query);

			return $array[$field];
}
else
{
return pg_fetch_result($query, $row, $field);

			if($array !== null && $array !== false)
{
return $array[$field];
}
return null;

		}

		}

 

return pg_fetch_result($query, $row, $field);

	}

/**

	}

/**