• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP ibase_query函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中ibase_query函数的典型用法代码示例。如果您正苦于以下问题:PHP ibase_query函数的具体用法?PHP ibase_query怎么用?PHP ibase_query使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了ibase_query函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: execute

 public function execute($sql, $bindParams = array(), $additionalParameters = array())
 {
     $connection = $this->connection;
     if (empty($bindParams)) {
         $result = ibase_query($connection, $sql);
     } else {
         $holderRegex = "/@[a-zA-Z0-9_]+@/";
         preg_match_all($holderRegex, $sql, $matches);
         $args = array($connection, preg_replace($holderRegex, "?", $sql));
         foreach ($matches[0] as $holder) {
             $args[] = $bindParams[$holder];
         }
         $result = call_user_func_array("ibase_query", $args);
     }
     if (!$result) {
         $this->executeError($sql);
     }
     $rows = array();
     if (is_resource($result)) {
         while ($row = ibase_fetch_assoc($result, IBASE_TEXT)) {
             $rows[] = array_change_key_case($row);
         }
         ibase_free_result($result);
     } else {
         $this->affectedRows = $result === true ? 0 : $result;
     }
     if ($this->autoCommit) {
         ibase_commit($connection);
     }
     return empty($rows) ? null : $rows;
 }
开发者ID:reoring,项目名称:sabel,代码行数:31,代码来源:Driver.php


示例2: execute_query_trans

    protected function execute_query_trans($trans, $sql) {
	if ($exec = ibase_query($trans, $sql))
	    return $exec;

	//$this->gravaQueryArquivo($sql);
	return false;
    }
开发者ID:helbertfurbino,项目名称:sgmofinanceiro,代码行数:7,代码来源:modelConexao.php


示例3: recupera_campo

function recupera_campo($campo,$tabela,$campo_condicao,$condicao) {

    $consulta = "SELECT $campo FROM $tabela WHERE $campo_condicao = $condicao";
    $resultado = ibase_query($consulta);
    $registro = ibase_fetch_object($resultado);
    $campo = $registro->$campo;
    return $campo;
}
开发者ID:helbertfurbino,项目名称:sgmofinanceiro,代码行数:8,代码来源:paginacao.php


示例4: real

 public function real($sql)
 {
     $this->connect();
     $temp = \ibase_query($this->transaction !== null ? $this->transaction : $this->lnk, $sql);
     if (!$temp) {
         throw new DatabaseException('Could not execute query : ' . \ibase_errmsg() . ' <' . $sql . '>');
     }
     $this->aff = \ibase_affected_rows($this->lnk);
     return $temp;
 }
开发者ID:vakata,项目名称:database,代码行数:10,代码来源:Ibase.php


示例5: QueryObtieneDatos

 protected function QueryObtieneDatos()
 {
     $this->AbreCnx();
     //echo $this->query;
     $rs = ibase_query($this->cnx, $this->query);
     return $this->FetchAs($rs);
     //var_dump($rs);
     //echo $this->query;
     unset($this->query);
     $this->CierraCnx();
 }
开发者ID:ofarias,项目名称:phpPegaso,代码行数:11,代码来源:database.php


示例6: Buscar

 function Buscar($q)
 {
     $conn = ibase_connect($this->src, $this->user, $this->password);
     $query = "SELECT INVE03.CVE_ART, INVE03.DESCR FROM inve03 where INVE03.DESCR LIKE '%" . $q . "%' AND INVE03.STATUS='A' OR INVE03.CVE_ART LIKE '%" . $q . "%' AND INVE03.STATUS='A' ORDER BY INVE03.CVE_ART";
     $inv = ibase_query($conn, $query);
     print "<table width='100%' border='0' cellspacing='0' cellpadding='0' style='font-family:Verdana; font-size:10; font-color:#CDCD'>\n\t\t\t\t<tr>\n\t\t\t\t\t<td></td>\n\t\t\t\t\t<td></td>\n\t\t\t\t\t<td></td>\n\t\t\t\t</tr>";
     while ($IN = ibase_fetch_row($inv)) {
         print "<tr>" . "<td>" . $IN[1] . "</td>" . "<td><input style='border:0; background-color: #f9f9f9; font-family:Verdana; font-size:10; font-color:#CDCD; cursor:pointer' type='submit' id='valor2' value='" . $IN[0] . "' onClick='Resultado(\"" . $IN[0] . "\");'/></td>" . "</tr>";
     }
     print "</table>";
 }
开发者ID:kailIII,项目名称:Inventarios-1,代码行数:11,代码来源:findinv.php


示例7: executeQuery

 public function executeQuery($sql)
 {
     try {
         $this->openConnection();
         $this->rtemp = ibase_query($this->connection, $sql);
         while ($row = ibase_fetch_object($this->rtemp)) {
             $this->result[] = $row;
         }
         $this->freeResult();
         $this->closeConnection();
     } catch (Exception $ex) {
         $this->logger->log("Exception while connection with firebird database... {$ex}");
     }
 }
开发者ID:solutionsCluster,项目名称:silar,代码行数:14,代码来源:FirebirdConnector.php


示例8: query

 function query($query, $unbuffered = false)
 {
     $result = ibase_query($query, $this->_link);
     if (!$result) {
         $this->errno = ibase_errcode();
         $this->error = ibase_errmsg();
         return false;
     }
     $this->error = "";
     if ($result === true) {
         $this->affected_rows = ibase_affected_rows($this->_link);
         return true;
     }
     return new Min_Result($result);
 }
开发者ID:tlandn,项目名称:akvo-sites-zz-template,代码行数:15,代码来源:firebird.inc.php


示例9: num_rows

 /**
  * Number of rows in the result set
  *
  * Firebird/Interbase doesn't have a graceful way to retun the number of rows
  * so we have to use what amounts to a hack.
  *
  * @access  public
  * @return  integer
  */
 function num_rows()
 {
     if (!isset($this->sql)) {
         return 0;
     } else {
         $stmt_temp = $this->sql;
         $sth_temp = ibase_query($this->conn_id, $stmt_temp);
         $row_count = 0;
         while ($row_temp = ibase_fetch_object($sth_temp)) {
             $row_count = $row_count + 1;
         }
         ibase_free_result($sth_temp);
         return $row_count;
     }
 }
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:24,代码来源:ibase_result.php


示例10: simpleQuery

 function simpleQuery($query)
 {
     $ismanip = DB::isManip($query);
     $this->last_query = $query;
     $query = $this->modifyQuery($query);
     $result = @ibase_query($this->connection, $query);
     if (!$result) {
         return $this->raiseError();
     }
     if ($this->autocommit && $ismanip) {
         ibase_commit($this->connection);
     }
     // Determine which queries that should return data, and which
     // should return an error code only.
     return DB::isManip($query) ? DB_OK : $result;
 }
开发者ID:joeymetal,项目名称:v1,代码行数:16,代码来源:ibase.php


示例11: deleteRow

function deleteRow($table, $params)
{
    $sql = 'delete from ';
    if (is_array($params)) {
        foreach ($params as $fieldname => $id) {
            $sql .= ' ' . $table;
            $sql .= ' where ' . $fieldname . ' = ' . $id;
        }
    }
    //return $sql;
    $result = ibase_query($sql);
    if ($result) {
        return true;
    } else {
        return false;
    }
}
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:17,代码来源:pendataan_parkir.asyc.php


示例12: DBAQuery

 function DBAQuery(&$db, $database_file, $query)
 {
     if (!function_exists("ibase_connect")) {
         return $db->SetError("DBA query", "Interbase support is not available in this PHP configuration");
     }
     if (!isset($db->options[$option = "DBAUser"]) || !isset($db->options[$option = "DBAPassword"])) {
         return $db->SetError("DBA query", "it was not specified the Interbase {$option} option");
     }
     $database = $db->host . (strcmp($database_file, "") ? ":" . $database_file : "");
     if (($connection = @ibase_connect($database, $db->options["DBAUser"], $db->options["DBAPassword"])) <= 0) {
         return $db->SetError("DBA query", "Could not connect to Interbase server ({$database}): " . ibase_errmsg());
     }
     if (!($success = @ibase_query($connection, $query))) {
         $db->SetError("DBA query", "Could not execute query ({$query}): " . ibase_errmsg());
     }
     ibase_close($connection);
     return $success;
 }
开发者ID:BackupTheBerlios,项目名称:zvs,代码行数:18,代码来源:manager_ibase.php


示例13: __construct

 /**
  * This function initializes the class.
  *
  * @access public
  * @override
  * @param DB_Connection_Driver $connection  the connection to be used
  * @param string $sql                       the SQL statement to be queried
  * @param integer $mode                     the execution mode to be used
  * @throws Throwable_SQL_Exception          indicates that the query failed
  */
 public function __construct(DB_Connection_Driver $connection, $sql, $mode = NULL)
 {
     $this->resource = $connection->get_resource();
     $command = @ibase_query($this->resource, $sql);
     if ($command === FALSE) {
         throw new Throwable_SQL_Exception('Message: Failed to query SQL statement. Reason: :reason', array(':reason' => @ibase_errmsg()));
     }
     $this->command = $command;
     $this->record = FALSE;
     $this->blobs = array();
     $count = (int) @ibase_num_fields($command);
     for ($i = 0; $i < $count; $i++) {
         $field = ibase_field_info($command, $i);
         if ($field['type'] == 'BLOB') {
             $this->blobs[] = $field['name'];
         }
     }
 }
开发者ID:ruslankus,项目名称:invoice-crm,代码行数:28,代码来源:Standard.php


示例14: dbQuery

function dbQuery($query, $show_errors = true, $all_results = true, $show_output = true)
{
    if ($show_errors) {
        error_reporting(E_ALL);
    } else {
        error_reporting(E_PARSE);
    }
    // Connect to the Firebird/Interbase Sybase database management system
    $link = ibase_pconnect("/var/www/sqlmap/dbs/firebird/testdb.fdb", "SYSDBA", "testpass");
    if (!$link) {
        die(ibase_errmsg());
    }
    // Print results in HTML
    print "<html><body>\n";
    // Print SQL query to test sqlmap '--string' command line option
    //print "<b>SQL query:</b> " . $query . "<br>\n";
    // Perform SQL injection affected query
    $result = ibase_query($link, $query);
    if (!$result) {
        if ($show_errors) {
            print "<b>SQL error:</b> " . ibase_errmsg() . "<br>\n";
        }
        exit(1);
    }
    print "<b>SQL results:</b>\n";
    print "<table border=\"1\">\n";
    while ($line = ibase_fetch_assoc($result)) {
        // This must stay here for Firebird
        if (!$show_output) {
            exit(1);
        }
        print "<tr>";
        foreach ($line as $col_value) {
            print "<td>" . $col_value . "</td>";
        }
        print "</tr>\n";
        if (!$all_results) {
            break;
        }
    }
    print "</table>\n";
    print "</body></html>";
}
开发者ID:dieface,项目名称:testenv,代码行数:43,代码来源:firebird.inc.php


示例15: gcms_query

function gcms_query($query)
{
    global $fbdb, $gcms_query_result, $gcms_trans_id;
    $xid = $gcms_trans_id;
    if (!$xid) {
        gcms_trans();
    }
    $gcms_query_result = ibase_query($fbdb, $query);
    if (!$xid) {
        if ($gcms_query_result) {
            gcms_commit();
        } else {
            gcms_rollback();
        }
    }
    if (!$gcms_query_result) {
        print "<br>" . $query . "<br><br>";
    }
    return $gcms_query_result;
}
开发者ID:ibnoe,项目名称:simpatda-thinkfrogs,代码行数:20,代码来源:firebird.php


示例16: Connectqro

     $ABR = 'CUU';
 }
 if ($num_suc == 9) {
     $conn = Connectqro();
     $ABR = 'QRO';
 }
 if ($num_suc == 10) {
     $conn = Connecttgz();
     $ABR = 'TGZ';
 }
 if ($clave == '') {
     $sql = "SELECT MINVE03.CVE_ART, MINVE03.CVE_CPTO, MINVE03.FECHA_DOCU,MINVE03.REFER, MINVE03.CANT AS CANTIDAD, MINVE03.EXISTENCIA FROM MINVE03 WHERE MINVE03.REFER ='{$folio}' ORDER BY MINVE03.CVE_ART DESC  ";
 } else {
     $sql = "SELECT MINVE03.CVE_ART, MINVE03.CVE_CPTO, MINVE03.FECHA_DOCU,MINVE03.REFER, MINVE03.CANT AS CANTIDAD, MINVE03.EXISTENCIA FROM MINVE03 WHERE MINVE03.REFER ='{$folio}' and MINVE03.CVE_ART='{$clave}' ORDER BY MINVE03.CVE_ART DESC  ";
 }
 $conexsuc = ibase_query($conn, $sql);
 while ($CS = ibase_fetch_row($conexsuc)) {
     $fechasal = $CS[2];
     $maskSAL = $fechasal[8] . $fechasal[9] . $fechasal[7] . $fechasal[5] . $fechasal[6] . $fechasal[4] . $fechasal[0] . $fechasal[1] . $fechasal[2] . $fechasal[3];
     if ($CS[1] > '50') {
         $cant = $CS[4] * -1;
         $restacant = $restacant + $cant;
     } else {
         $cant = $CS[4];
         $sumacant = $sumacant + $cant;
     }
     /*
     echo "<tr class='content'><td>$CS[0]</td><td>$CS[3]</td><td align='center'>$cant</td><td>$maskSAL</td><td>$CS[1]</td><td>$ABR</td></tr>";
     $count = $count + 1; 
     */
     $registros[$num]["clave"] = $CS[0];
开发者ID:kailIII,项目名称:Inventarios-1,代码行数:31,代码来源:Cartas.php


示例17: tableInfo

 /**
  * Returns information about a table or a result set
  *
  * NOTE: only supports 'table' and 'flags' if <var>$result</var>
  * is a table name.
  *
  * @param object|string  $result  DB_result object from a query or a
  *                                 string containing the name of a table.
  *                                 While this also accepts a query result
  *                                 resource identifier, this behavior is
  *                                 deprecated.
  * @param int            $mode    a valid tableInfo mode
  *
  * @return array  an associative array with the information requested.
  *                 A DB_Error object on failure.
  *
  * @see DB_common::tableInfo()
  */
 function tableInfo($result, $mode = null)
 {
     if (is_string($result)) {
         /*
          * Probably received a table name.
          * Create a result resource identifier.
          */
         $id = @ibase_query($this->connection, "SELECT * FROM {$result} WHERE 1=0");
         $got_string = true;
     } elseif (isset($result->result)) {
         /*
          * Probably received a result object.
          * Extract the result resource identifier.
          */
         $id = $result->result;
         $got_string = false;
     } else {
         /*
          * Probably received a result resource identifier.
          * Copy it.
          * Deprecated.  Here for compatibility only.
          */
         $id = $result;
         $got_string = false;
     }
     if (!is_resource($id)) {
         return $this->ibaseRaiseError(DB_ERROR_NEED_MORE_DATA);
     }
     if ($this->options['portability'] & DB_PORTABILITY_LOWERCASE) {
         $case_func = 'strtolower';
     } else {
         $case_func = 'strval';
     }
     $count = @ibase_num_fields($id);
     $res = array();
     if ($mode) {
         $res['num_fields'] = $count;
     }
     for ($i = 0; $i < $count; $i++) {
         $info = @ibase_field_info($id, $i);
         $res[$i] = array('table' => $got_string ? $case_func($result) : '', 'name' => $case_func($info['name']), 'type' => $info['type'], 'len' => $info['length'], 'flags' => $got_string ? $this->_ibaseFieldFlags($info['name'], $result) : '');
         if ($mode & DB_TABLEINFO_ORDER) {
             $res['order'][$res[$i]['name']] = $i;
         }
         if ($mode & DB_TABLEINFO_ORDERTABLE) {
             $res['ordertable'][$res[$i]['table']][$res[$i]['name']] = $i;
         }
     }
     // free the result only if we were called on a table
     if ($got_string) {
         @ibase_free_result($id);
     }
     return $res;
 }
开发者ID:ryo88c,项目名称:BEAR.Saturday,代码行数:72,代码来源:ibase.php


示例18: str_replace

                $unit = $row[2];
                $charlimits = str_replace('%', '\\%', $row[3]);
                $charlimits = str_replace('^', '\\^{}', $charlimits);
                $ress = $row[1];
                if ($row[4] == "O") {
                    $ress = "\\textbf{" . $row[1] . "}";
                }
                $results .= "~ \\footnotesize " . $row[0] . " & \\footnotesize " . $ress . " & \\footnotesize " . $unit . " \\\\ \n";
                $results .= "\\hline" . "\n";
            }
            ibase_free_result($res);
        }
    }
}
$user = getUserEnterResults($ordersid, $dbh);
$appruser = getApprUser($ordersid, $dbh);
$comments = "";
$restm = "select distinct f.comments  from foldercomments f inner join orders o on o.folderno = f.folderno where o.id in(" . $ordersid . ") and f.flag = 'Y' order by f.id";
$res = ibase_query($dbh, $restm);
while ($row = ibase_fetch_row($res)) {
    $comments .= "\\small \\quad " . $row[0] . "\n\n";
}
ibase_free_result($res);
$biomat = find_biomat($ordersid, $dbh);
$head = "\\SetWatermarkText{" . $watermark . "}\n";
$head .= "\\vspace{-10px} \\flushleft \\normalsize  Биоматериал: " . $biomat . "\n\n\\vspace{3px}";
$head .= "\n\\begin{longtable}[h]{|m{230px}|>{\\centering\\arraybackslash}p{140px}|m{90px}|}\n\\hline\nИсследование & Результат & Единицы \\newline  измерения \\\\\n\\hline";
$apprdate = find_apprdate($ordersid, $dbh);
$comments = str_replace('%', '\\%', $comments);
$end = "\\end{longtable}\n\\vspace{-15px}\n\\flushleft Комментарии:" . $comments . "\n\\vspace{-4px}\n\\flushleft Исследования проводил: " . $user . " \n\\vspace{-4px}\n\\flushleft Выпускающий врач: " . $appruser . " \n\\newline\n\\flushright Дата выдачи: " . $apprdate;
$response = $head . $results . $end;
开发者ID:KhasanOrsaev,项目名称:work_nacpp,代码行数:31,代码来源:form31.php


示例19: DoQuery

 function DoQuery($query, $first = 0, $limit = 0, $prepared_query = 0)
 {
     $connection = $this->auto_commit ? $this->connection : $this->transaction_id;
     if ($prepared_query && isset($this->query_parameters[$prepared_query]) && count($this->query_parameters[$prepared_query]) > 2) {
         if (function_exists("call_user_func_array")) {
             $this->query_parameters[$prepared_query][0] = $connection;
             $this->query_parameters[$prepared_query][1] = $query;
             $result = @call_user_func_array("ibase_query", $this->query_parameters[$prepared_query]);
         } else {
             switch (count($this->query_parameters[$prepared_query])) {
                 case 3:
                     $result = @ibase_query($connection, $query, $this->query_parameters[$prepared_query][2]);
                     break;
                 case 4:
                     $result = @ibase_query($connection, $query, $this->query_parameters[$prepared_query][2], $this->query_parameters[$prepared_query][3]);
                     break;
                 case 5:
                     $result = @ibase_query($connection, $query, $this->query_parameters[$prepared_query][2], $this->query_parameters[$prepared_query][3], $this->query_parameters[$prepared_query][4]);
                     break;
                 case 6:
                     $result = @ibase_query($connection, $query, $this->query_parameters[$prepared_query][2], $this->query_parameters[$prepared_query][3], $this->query_parameters[$prepared_query][4], $this->query_parameters[$prepared_query][5]);
                     break;
                 case 7:
                     $result = @ibase_query($connection, $query, $this->query_parameters[$prepared_query][2], $this->query_parameters[$prepared_query][3], $this->query_parameters[$prepared_query][4], $this->query_parameters[$prepared_query][5], $this->query_parameters[$prepared_query][6]);
                     break;
                 case 8:
                     $result = @ibase_query($connection, $query, $this->query_parameters[$prepared_query][2], $this->query_parameters[$prepared_query][3], $this->query_parameters[$prepared_query][4], $this->query_parameters[$prepared_query][5], $this->query_parameters[$prepared_query][6], $this->query_parameters[$prepared_query][7]);
                     break;
                 case 9:
                     $result = @ibase_query($connection, $query, $this->query_parameters[$prepared_query][2], $this->query_parameters[$prepared_query][3], $this->query_parameters[$prepared_query][4], $this->query_parameters[$prepared_query][5], $this->query_parameters[$prepared_query][6], $this->query_parameters[$prepared_query][7], $this->query_parameters[$prepared_query][8]);
                     break;
                 case 10:
                     $result = @ibase_query($connection, $query, $this->query_parameters[$prepared_query][2], $this->query_parameters[$prepared_query][3], $this->query_parameters[$prepared_query][4], $this->query_parameters[$prepared_query][5], $this->query_parameters[$prepared_query][6], $this->query_parameters[$prepared_query][7], $this->query_parameters[$prepared_query][8], $this->query_parameters[$prepared_query][9]);
                     break;
             }
         }
     } else {
         $result = @ibase_query($connection, $query);
     }
     if ($result) {
         if ($select = substr(strtolower(ltrim($query)), 0, strlen("select")) == "select") {
             $result_value = intval($result);
             $this->current_row[$result_value] = -1;
             if ($limit > 0) {
                 $this->limits[$result_value] = array($first, $limit, 0);
             }
             $this->highest_fetched_row[$result_value] = -1;
         } else {
             $this->affected_rows = -1;
         }
     } else {
         return $this->SetError("Do query", "Could not execute query ({$query}): " . ibase_errmsg());
     }
     return $result;
 }
开发者ID:BackupTheBerlios,项目名称:zvs,代码行数:55,代码来源:metabase_ibase.php


示例20: _execute

 /**
  * Execute the query
  *
  * @param	string	$sql	an SQL query
  * @return	resource
  */
 protected function _execute($sql)
 {
     return ibase_query($this->conn_id, $sql);
 }
开发者ID:aldsdelram,项目名称:PUPNLPWebsite,代码行数:10,代码来源:ibase_driver.php



注:本文中的ibase_query函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ibase_rollback函数代码示例发布时间:2022-05-15
下一篇:
PHP ibase_prepare函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap