本文整理汇总了PHP中fbsql_query函数的典型用法代码示例。如果您正苦于以下问题:PHP fbsql_query函数的具体用法?PHP fbsql_query怎么用?PHP fbsql_query使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了fbsql_query函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: simpleQuery
/**
* Sends a query to the database server
*
* @param string the SQL query string
*
* @return mixed + a PHP result resrouce for successful SELECT queries
* + the DB_OK constant for other successful queries
* + a DB_Error object on failure
*/
function simpleQuery($query)
{
$this->last_query = $query;
$query = $this->modifyQuery($query);
$result = @fbsql_query("{$query};", $this->connection);
if (!$result) {
return $this->fbsqlRaiseError();
}
// Determine which queries that should return data, and which
// should return an error code only.
if ($this->_checkManip($query)) {
return DB_OK;
}
return $result;
}
开发者ID:roojs,项目名称:pear,代码行数:24,代码来源:fbsql.php
示例2: _query
function _query($sql, $inputarr)
{
return fbsql_query("{$sql};", $this->_connectionID);
}
开发者ID:BackupTheBerlios,项目名称:facturaphp-svn,代码行数:4,代码来源:adodb-fbsql.inc.php
示例3: _query
function _query($sql,$inputarr=false)
{
return fbsql_query("$sql;",$this->_connectionID);
}
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:4,代码来源:adodb-fbsql.inc.php
示例4: simpleQuery
/**
* Send a query to fbsql and return the results as a fbsql resource
* identifier.
*
* @param the SQL query
*
* @access public
*
* @return mixed returns a valid fbsql result for successful SELECT
* queries, DB_OK for other successful queries. A DB error is
* returned on failure.
*/
function simpleQuery($query)
{
$this->last_query = $query;
$query = $this->modifyQuery($query);
$result = @fbsql_query("{$query};", $this->connection);
if (!$result) {
return $this->fbsqlRaiseError();
}
// Determine which queries that should return data, and which
// should return an error code only.
if (DB::isManip($query)) {
return DB_OK;
}
$numrows = $this->numrows($result);
if (is_object($numrows)) {
return $numrows;
}
$this->num_rows[$result] = $numrows;
return $result;
}
开发者ID:ronaldoof,项目名称:geocloud2,代码行数:32,代码来源:fbsql.php
示例5: query
/**
* Send a query to the database and return any results
*
* @access public
*
* @param string $query the SQL query
* @param mixed $types array that contains the types of the columns in
* the result set
*
* @return mixed a result handle or MDB_OK on success, a MDB error on failure
*/
function query($query, $types = NULL)
{
$this->debug("Query: {$query}");
$ismanip = MDB::isManip($query);
$this->last_query = $query;
$first = $this->first_selected_row;
$limit = $this->selected_row_limit;
$this->first_selected_row = $this->selected_row_limit = 0;
$result = $this->connect();
if (MDB::isError($result)) {
return $result;
}
if ($limit > 0) {
if (!$ismanip) {
$query = str_replace('SELECT', "SELECT TOP({$first},{$limit})", $query);
}
}
if ($this->database_name != '') {
if (!@fbsql_select_db($this->database_name, $this->connection)) {
return $this->fbsqlRaiseError();
}
}
// Add ; to the end of the query. This is required by FrontBase
$query .= ';';
if ($result = @fbsql_query($query, $this->connection)) {
if ($ismanip) {
$this->affected_rows = @fbsql_affected_rows($this->connection);
return MDB_OK;
} else {
$result_value = intval($result);
$this->highest_fetched_row[$result_value] = -1;
if ($types != NULL) {
if (!is_array($types)) {
$types = array($types);
}
if (MDB::isError($err = $this->setResultTypes($result, $types))) {
$this->freeResult($result);
return $err;
}
}
return $result;
}
}
return $this->fbsqlRaiseError();
}
开发者ID:Esleelkartea,项目名称:kz-adeada-talleres-electricos-,代码行数:56,代码来源:fbsql.php
示例6: query_fbsql
function query_fbsql($query)
{
if (!$this->fbsql_link) {
return false;
}
$this->query_result = fbsql_query($query, $this->fbsql_link);
if ($this->query_result) {
return $this->query_result;
} else {
print nl2br("Error query. \n");
return false;
}
}
开发者ID:laiello,项目名称:cartonbank,代码行数:13,代码来源:phpMM_V_23_08_2007.php
示例7: query
public function query($query, $security = array())
{
$this->query = fbsql_query($query, $this->connect);
return $this->query;
}
开发者ID:Allopa,项目名称:ZN-Framework-Starter,代码行数:5,代码来源:FbsqlDriver.php
示例8: array
/**
* Execute a query
* @param string $query query
* @param boolean $is_manip if the query is a manipulation query
* @param resource $connection
* @param string $database_name
* @return result or error object
* @access protected
*/
function &_doQuery($query, $is_manip = false, $connection = null, $database_name = null)
{
$this->last_query = $query;
$result = $this->debug($query, 'query', array('is_manip' => $is_manip, 'when' => 'pre'));
if ($result) {
if (MDB2::isError($result)) {
return $result;
}
$query = $result;
}
if ($this->options['disable_query']) {
$result = $is_manip ? 0 : null;
return $result;
}
if (null === $connection) {
$connection = $this->getConnection();
if (MDB2::isError($connection)) {
return $connection;
}
}
if (null === $database_name) {
$database_name = $this->database_name;
}
if ($database_name) {
if ($database_name != $this->connected_database_name) {
if (!@fbsql_select_db($database_name, $connection)) {
$err = $this->raiseError(null, null, null, 'Could not select the database: ' . $database_name, __FUNCTION__);
return $err;
}
$this->connected_database_name = $database_name;
}
}
$result = @fbsql_query($query, $connection);
if (!$result) {
$err =& $this->raiseError(null, null, null, 'Could not execute statement', __FUNCTION__);
return $err;
}
$this->debug($query, 'query', array('is_manip' => $is_manip, 'when' => 'post', 'result' => $result));
return $result;
}
开发者ID:Dulciane,项目名称:jaws,代码行数:49,代码来源:fbsql.php
示例9: _doQuery
/**
* Execute a query
* @param string $query query
* @param boolean $is_manip if the query is a manipulation query
* @param resource $connection
* @param string $database_name
* @return result or error object
* @access protected
*/
function _doQuery($query, $is_manip = false, $connection = null, $database_name = null)
{
$this->last_query = $query;
$this->debug($query, 'query', $is_manip);
if ($this->options['disable_query']) {
if ($is_manip) {
return 0;
}
return null;
}
if (is_null($connection)) {
$connection = $this->getConnection();
if (PEAR::isError($connection)) {
return $connection;
}
}
if (is_null($database_name)) {
$database_name = $this->database_name;
}
if ($database_name) {
if ($database_name != $this->connected_database_name) {
if (!@fbsql_select_db($database_name, $connection)) {
return $this->raiseError();
}
$this->connected_database_name = $database_name;
}
}
$result = @fbsql_query($query, $connection);
if (!$result) {
return $this->raiseError();
}
return $result;
}
开发者ID:ajisantoso,项目名称:kateglo,代码行数:42,代码来源:fbsql.php
注:本文中的fbsql_query函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论