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


PHP pg_errormessage函数代码示例

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


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

示例1: get_provider_data

function get_provider_data($provider_id)
{
    $qry = pg_query_params("select sp_home_page, contactemail from techmatcher.serviceprovider where serviceprovider_id=\$1", array($provider_id)) or die(pg_errormessage());
    $result = pg_fetch_assoc($qry);
    $_SESSION['provider']['contactemail'] = $result['contactemail'];
    return $result["sp_home_page"];
}
开发者ID:nkpajsmith,项目名称:nealsgit2,代码行数:7,代码来源:provider.php

示例2: Delete

 /**
  * Удалить код активации
  *
  * @param integer $fid	ID Пользователя, у которого удаляем код активации
  * @return string	Сообщение об ошибке
  */
 function Delete($fid)
 {
     global $DB;
     $sql = "DELETE FROM activate_mail WHERE user_id = ?";
     $DB->query($sql, $fid);
     return pg_errormessage();
 }
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:13,代码来源:activate_mail.php

示例3: executeQuery

 public function executeQuery($sql)
 {
     //prepare query
     $sql = $this->prepareQuery($sql);
     $parts = explode(" ", trim($sql));
     $type = strtolower($parts[0]);
     $hash = md5($sql);
     $this->lastHash = $hash;
     if ($type == "select") {
         if (isset($this->results[$hash])) {
             if (is_resource($this->results[$hash])) {
                 return $this->results[$hash];
             }
         }
     } else {
         if ("update" == $type || "delete" == $type) {
             $this->results = array();
             //clear the result cache
         }
     }
     $query = pg_query($this->connection, $sql);
     if (!$query) {
         echo pg_errormessage($this->connection);
     }
     $this->results[$hash] = $query;
     return $this->results[$hash];
 }
开发者ID:prajeenapk,项目名称:VioletPHP,代码行数:27,代码来源:postgresqlDriver.php

示例4: query

 public function query($string = '')
 {
     if ($string != '') {
         $this->query = $this->escape($string);
     } else {
         $this->query = $this->select . $this->insert . $this->update . $this->delete . $this->create . $this->from . $this->join . $this->where . $this->group . $this->order . $this->limit;
     }
     $this->insert = " RETURNING id";
     $this->result = pg_exec($this->connection, $this->query);
     $this->inserted_id = $this->result;
     $this->error = pg_errormessage($this->connection);
     $this->affected_rows = pg_affected_rows($this->result);
     $this->select = '';
     $this->insert = '';
     $this->update = '';
     $this->delete = '';
     $this->create = '';
     $this->from = '';
     $this->join = '';
     $this->where = '';
     $this->group = '';
     $this->order = '';
     $this->limit = '';
     return $this;
 }
开发者ID:varyan,项目名称:system,代码行数:25,代码来源:postgresql.php

示例5: my_handler

function my_handler($sql_insert)
{
    global $table, $link, $new_name;
    $sql_insert = ereg_replace($table, $new_name, $sql_insert);
    $result = pg_exec($link, pre_query($sql_insert)) or pg_die(pg_errormessage($link), $sql_insert, __FILE__, __LINE__);
    $sql_query = $sql_insert;
}
开发者ID:CMMCO,项目名称:Intranet,代码行数:7,代码来源:tbl_copy.php

示例6: ChVisible

 /**
  * Изменить параметр "видимости" анонима на противоположный
  *
  * @param integer $aid		идентификатор анонима
  * @return char				сообщение об ошибке
  */
 function ChVisible($aid)
 {
     global $DB;
     $sql = "UPDATE anonymous SET visible = NOT visible::bool WHERE id = ?";
     $DB->squery($sql, $aid);
     $error = pg_errormessage();
     return $error;
 }
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:14,代码来源:anonymous.php

示例7: get_address_by_serviceid

function get_address_by_serviceid($serviceprovider_id)
{
    $result = pg_query_params("SELECT address_id FROM techmatcher.serviceprovidertoaddress WHERE serviceprovider_id=\$1 AND address_deleted=\$2", array($serviceprovider_id, "FALSE")) or die(pg_errormessage());
    $names = array();
    while ($name = pg_fetch_assoc($result)) {
        $names[] = $name;
    }
    return $names;
}
开发者ID:nkpajsmith,项目名称:nealsgit2,代码行数:9,代码来源:address.php

示例8: ejecutarConsulta

 public function ejecutarConsulta($sql)
 {
     $resultado = pg_query($this->conexion, $sql) or die("La consulta fallo1: " . pg_last_error($this->conexion));
     if (!isset($resultado)) {
         echo "La consulta fallo2: " . pg_errormessage();
         exit;
     }
     return $resultado;
 }
开发者ID:victorsanjines667,项目名称:registroEstudiantes,代码行数:9,代码来源:BDPG.class.php

示例9: set_privilege

function set_privilege($sql_set_privilege)
{
    global $link;
    if (!($res = @pg_exec($link, $sql_set_privilege))) {
        pg_die(pg_errormessage($link), $sql_set_privilege, __FILE__, __LINE__);
    } else {
        echo "<p>{$sql_set_privilege}</p>\n";
    }
}
开发者ID:CMMCO,项目名称:Intranet,代码行数:9,代码来源:tbl_privilege.php

示例10: get_staff_for_provider

function get_staff_for_provider($serviceprovider_id)
{
    $result = pg_query_params("SELECT spstaff_id FROM techmatcher.serviceprovidershavestaff WHERE serviceprovider_id = \$1", array($serviceprovider_id)) or die(pg_errormessage());
    $names = array();
    while ($name = pg_fetch_assoc($result)) {
        $names[] = $name;
    }
    return $names;
}
开发者ID:nkpajsmith,项目名称:nealsgit2,代码行数:9,代码来源:experience.php

示例11: setClientCharset

 /**
  * A method to set the client charset
  *
  * @param string $charset
  * @return mixed True on success, PEAR_Error otherwise
  */
 function setClientCharset($charset)
 {
     if (!empty($charset) && $this->oDbh) {
         $pg = $this->oDbh->getConnection();
         if (@pg_set_client_encoding($pg, $charset) == -1) {
             return new PEAR_Error(pg_errormessage($pg));
         }
     }
     return true;
 }
开发者ID:ballistiq,项目名称:revive-adserver,代码行数:16,代码来源:pgsql.php

示例12: connect

 function connect()
 {
     $this->link = pg_connect("host='" . $this->hostname . "' port='" . $this->port . "' dbname='" . $this->db . "' user='" . $this->username . "' password='" . $this->password . "'");
     if (!$this->link) {
         $this->error = pg_errormessage($this->db);
         return false;
     }
     $this->exeq("set search_path to '" . $this->schema . "'");
     return true;
 }
开发者ID:alexgallardo,项目名称:coddns,代码行数:10,代码来源:pgclient.php

示例13: getSP_Rated

function getSP_Rated()
{
    $qry = "SELECT * FROM techmatcher.ratingevents where ratingtotal>0;";
    $result = pg_query_params($qry, array()) or die(pg_errormessage());
    if (pg_num_rows($result) > 0) {
        return $result;
    } else {
        return false;
    }
}
开发者ID:nkpajsmith,项目名称:nealsgit2,代码行数:10,代码来源:search.php

示例14: FetchByMaster

 function FetchByMaster($MasterName)
 {
     $sql = "\nSELECT id          AS slave_port_id,\n       name        AS slave_port_name,\n       category_id AS slave_category_id,\n       category    AS slave_category_name\n  FROM ports_active\n WHERE master_port = '" . pg_escape_string($MasterName) . "'\nORDER BY slave_category_name, slave_port_name";
     #echo "sql = <pre>$sql</pre>";
     $this->LocalResult = pg_exec($this->dbh, $sql);
     if (!$this->LocalResult) {
         echo pg_errormessage() . " {$sql}";
     }
     $numrows = pg_numrows($this->LocalResult);
     return $numrows;
 }
开发者ID:brycied00d,项目名称:freshports,代码行数:11,代码来源:master_slave.php

示例15: Insert

 function Insert()
 {
     # delete the ignore entry for this commit/port combination
     $sql = "\nINSERT INTO commit_log_ports_ignore (commit_log_id, port_id, reason)\n   values ({$this->commit_log_id}, {$this->port_id}, '" . pg_escape_string($this->reason) . "')";
     echo "\$sql='<pre>{$sql}</pre><br>\n";
     $this->result = pg_exec($this->dbh, $sql);
     if (!$this->result) {
         echo pg_errormessage() . " {$sql}";
     }
     $numrows = pg_affected_rows($this->result);
     return $numrows;
 }
开发者ID:brycied00d,项目名称:freshports,代码行数:12,代码来源:commit_log_ports_ignore.php


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