当前位置: 首页>>代码示例>>PHP>>正文


PHP ifx_affected_rows函数代码示例

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


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

示例1: _affectedrows

 function _affectedrows()
 {
     if ($this->lastQuery) {
         return @ifx_affected_rows($this->lastQuery);
     }
     return 0;
 }
开发者ID:JonsonChang,项目名称:mail_tracker,代码行数:7,代码来源:adodb-informix72.inc.php

示例2: affected_rows

 /**
  * Numero de Filas afectadas en un insert, update o delete
  *
  * @param resource $result_query
  * @return int
  */
 public function affected_rows($result_query = '')
 {
     if (!$result_query) {
         $result_query = $this->last_result_query;
         if (!$result_query) {
             return false;
         }
     }
     if (($numberRows = ifx_affected_rows($result_query)) !== false) {
         return $numberRows;
     } else {
         $this->lastError = $this->error();
         throw new KumbiaException($this->error());
     }
     return false;
 }
开发者ID:raalveco,项目名称:Escuela,代码行数:22,代码来源:informix.php

示例3: simpleQuery

 /**
  * Send a query to Informix and return the results as a
  * Informix resource identifier.
  *
  * @param $query the SQL query
  *
  * @return int returns a valid Informix result for successful SELECT
  * queries, DB_OK for other successful queries.  A DB error code
  * is returned on failure.
  */
 function simpleQuery($query)
 {
     $this->last_query = $query;
     if (preg_match('/(SELECT)/i', $query)) {    //TESTME: Use !DB::isManip()?
         // the scroll is needed for fetching absolute row numbers
         // in a select query result
         $result = @ifx_query($query, $this->connection, IFX_SCROLL);
     } else {
         $result = @ifx_query($query, $this->connection);
     }
     if (!$result) {
         return $this->ifxraiseError();
     }
     $this->affected = ifx_affected_rows ($result);
     // Determine which queries that should return data, and which
     // should return an error code only.
     if (preg_match('/(SELECT)/i', $query)) {
         return $result;
     }
     return DB_OK;
 }
开发者ID:joeymetal,项目名称:v1,代码行数:31,代码来源:ifx.php

示例4: 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)
 {
     $ismanip = DB::isManip($query);
     $this->last_query = $query;
     $this->affected = null;
     if (preg_match('/(SELECT)/i', $query)) {
         //TESTME: Use !DB::isManip()?
         // the scroll is needed for fetching absolute row numbers
         // in a select query result
         $result = @ifx_query($query, $this->connection, IFX_SCROLL);
     } else {
         if (!$this->autocommit && $ismanip) {
             if ($this->transaction_opcount == 0) {
                 $result = @ifx_query('BEGIN WORK', $this->connection);
                 if (!$result) {
                     return $this->ifxRaiseError();
                 }
             }
             $this->transaction_opcount++;
         }
         $result = @ifx_query($query, $this->connection);
     }
     if (!$result) {
         return $this->ifxRaiseError();
     }
     $this->affected = @ifx_affected_rows($result);
     // Determine which queries should return data, and which
     // should return an error code only.
     if (preg_match('/(SELECT)/i', $query)) {
         return $result;
     }
     // XXX Testme: free results inside a transaction
     // may cause to stop it and commit the work?
     // Result has to be freed even with a insert or update
     @ifx_free_result($result);
     return DB_OK;
 }
开发者ID:Cyberspace-Networks,项目名称:PeopleAggregator,代码行数:46,代码来源:ifx.php

示例5: DoQuery

 function DoQuery($query, $first = 0, $limit = 0, $free_non_select_result = 1, $prepared_query = 0)
 {
     ifx_nullformat(1);
     ifx_blobinfile_mode(0);
     $query = ltrim($query);
     if (GetType($space = strpos($query, " ")) != "integer") {
         $space = strlen($query);
     }
     $query_type = strtolower(substr($query, 0, $space));
     if (($select = $query_type == "select") && $limit > 0) {
         $query = substr($query, 0, $space) . " FIRST " . ($first + $limit) . " " . substr($query, strlen("select"));
         $cursor_type = $first ? IFX_SCROLL : 0;
     } else {
         $cursor_type = 0;
     }
     if ($prepared_query && isset($this->query_parameters[$prepared_query]) && count($this->query_parameters[$prepared_query])) {
         $result = $cursor_type ? @ifx_query($query, $this->connection, $cursor_type, $this->query_parameters[$prepared_query]) : @ifx_query($query, $this->connection, $this->query_parameters[$prepared_query]);
     } else {
         $result = $cursor_type ? @ifx_query($query, $this->connection, $cursor_type) : @ifx_query($query, $this->connection);
     }
     if ($result) {
         $result_value = intval($result);
         switch ($query_type) {
             case "select":
                 $this->current_row[$result_value] = -1;
                 if ($limit > 0) {
                     $this->limits[$result_value] = array($first, $limit, 0);
                 }
                 $this->highest_fetched_row[$result_value] = -1;
                 break;
             case "commit":
             case "rollback":
             case "begin":
             case "database":
                 ifx_free_result($result);
                 break;
             default:
                 $this->affected_rows = ifx_affected_rows($result);
                 if ($free_non_select_result) {
                     ifx_free_result($result);
                 }
                 break;
         }
     } else {
         $this->SetIFXError("Do query", "Could not query Informix database");
     }
     return $result;
 }
开发者ID:BackupTheBerlios,项目名称:zvs,代码行数:48,代码来源:metabase_ifx.php

示例6: ifx_free_result

             $stringorderby_1_order[$posorderby_1_order][6] = '#CCFFCC';
             $posorderby_1_order = $posorderby_1_order + 1;
         }
     }
     //fin while
     ifx_free_result($g_idq);
 } else {
     if ($_SESSION['control_campos_co'] == 7) {
         // ubicación
         $bloqueo = "set isolation to dirty read";
         p_query($bloqueo);
         $vector_v_direcciones = array();
         $pos_vec_direcciones = 0;
         $sql = "SELECT g.t_direccion FROM v_direccion g " . $c_direccion2_vetor_dir;
         p_query($sql);
         $num = ifx_affected_rows($g_idq);
         $filas = 0;
         while ($registro = ifx_fetch_row($g_idq)) {
             $filas++;
             if ($filas == 1) {
                 $vector_v_direcciones[$pos_vec_direcciones][1] = $registro['t_direccion'];
                 $depurado = $registro['t_direccion'];
                 //echo "correcto-". $correcto=trim($depurado," ","\t","\n","\r","\0","\x0B","-",".","º","!","$","%","&","/","(",")","=","?","¿");
                 $correcto = str_replace("\t", " ", $depurado);
                 $correcto = str_replace("\n", " ", $correcto);
                 $correcto = str_replace("\r", " ", $correcto);
                 $correcto = str_replace("", " ", $correcto);
                 $correcto = str_replace("\v", " ", $correcto);
                 $correcto = str_replace("-", " ", $correcto);
                 $correcto = str_replace(".", " ", $correcto);
                 $correcto = str_replace("º", " ", $correcto);
开发者ID:juandadeveloper,项目名称:mobile,代码行数:31,代码来源:tester.php


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