public function query($sql, &$errnum, &$errmsg, $offset = 0, $limit = null, $vars = array())
	{
		if (is_array($vars)
			and count($vars))
		{
			foreach ($vars as $key => $value)
			{
				$vars[$key] = $this->escape($value);
			}

			array_unshift($vars, $sql);
			$sql = call_user_func_array('sprintf', $vars);
		}

		//print($sql . '<br>');

		return $this->_query($sql, $errnum, $errmsg, $offset, $limit);
	}
public function query($sql, &$errnum, &$errmsg, $offset = 0, $limit = null, $vars = array())
	{
		if (is_array($vars)
			and count($vars))
		{
			foreach ($vars as $key => $value)
			{
				$vars[$key] = $this->escape($value);
			}

			array_unshift($vars, $sql);
			$sql = call_user_func_array('sprintf', $vars);
		}

		//print($sql . '<br>');

		return $this->_query($sql, $errnum, $errmsg, $offset, $limit);
	}
public function query ( $ sql , & $ errnum , & $ errmsg , $ offset = 0 , $ limit = null , $ vars = array ( ) ) { if ( is_array ( $ vars ) and count ( $ vars ) ) { foreach ( $ vars as $ key => $ value ) { $ vars [ $ key ] = $ this -> escape ( $ value ) ; } array_unshift ( $ vars , $ sql ) ; $ sql = call_user_func_array ( 'sprintf' , $ vars ) ; } //print($sql . '<br>'); return $ this -> _query ( $ sql , $ errnum , $ errmsg , $ offset , $ limit ) ; }
Execute an SQL query against the database

@param string $sql
@param integer $errnum
@param string $errmsg
@return resource
Execute an SQL query against the database