當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Proveedor::hydrate方法代碼示例

本文整理匯總了PHP中Proveedor::hydrate方法的典型用法代碼示例。如果您正苦於以下問題:PHP Proveedor::hydrate方法的具體用法?PHP Proveedor::hydrate怎麽用?PHP Proveedor::hydrate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Proveedor的用法示例。


在下文中一共展示了Proveedor::hydrate方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: findPkSimple

 /**
  * Find object by primary key using raw SQL to go fast.
  * Bypass doSelect() and the object formatter by using generated code.
  *
  * @param     mixed $key Primary key to use for the query
  * @param     PropelPDO $con A connection object
  *
  * @return   Proveedor A model object, or null if the key is not found
  * @throws   PropelException
  */
 protected function findPkSimple($key, $con)
 {
     $sql = 'SELECT `ID`, `NOMBRE`, `DIRECCION`, `CORREO_ELETRONICO`, `NOMBRE_CONTACTO`, `TELEFONO`, `CIUDAD`, `OBSERVACION`, `NIT`, `RAZON_SOCIAL`, `CONTACTO`, `REFERENCIA`, `CORREO` FROM `proveedor` WHERE `ID` = :p0';
     try {
         $stmt = $con->prepare($sql);
         $stmt->bindValue(':p0', $key, PDO::PARAM_INT);
         $stmt->execute();
     } catch (Exception $e) {
         Propel::log($e->getMessage(), Propel::LOG_ERR);
         throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);
     }
     $obj = null;
     if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
         $obj = new Proveedor();
         $obj->hydrate($row);
         ProveedorPeer::addInstanceToPool($obj, (string) $key);
     }
     $stmt->closeCursor();
     return $obj;
 }
開發者ID:kcornejo,項目名稱:usac,代碼行數:30,代碼來源:BaseProveedorQuery.php

示例2: findPkSimple

 /**
  * Find object by primary key using raw SQL to go fast.
  * Bypass doSelect() and the object formatter by using generated code.
  *
  * @param     mixed $key Primary key to use for the query
  * @param     PropelPDO $con A connection object
  *
  * @return                 Proveedor A model object, or null if the key is not found
  * @throws PropelException
  */
 protected function findPkSimple($key, $con)
 {
     $sql = 'SELECT `idproveedor`, `proveedor_nombre`, `proveedor_contacto`, `proveedor_direccion`, `proveedor_direccion2`, `proveedor_colonia`, `proveedor_codigopostal`, `proveedor_ciudad`, `proveedor_estado`, `proveedor_pais`, `proveedor_email`, `proveedor_telefono`, `proveedor_telefonocelular`, `proveedor_fax`, `proveedor_rfc` FROM `proveedor` WHERE `idproveedor` = :p0';
     try {
         $stmt = $con->prepare($sql);
         $stmt->bindValue(':p0', $key, PDO::PARAM_INT);
         $stmt->execute();
     } catch (Exception $e) {
         Propel::log($e->getMessage(), Propel::LOG_ERR);
         throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);
     }
     $obj = null;
     if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
         $obj = new Proveedor();
         $obj->hydrate($row);
         ProveedorPeer::addInstanceToPool($obj, (string) $key);
     }
     $stmt->closeCursor();
     return $obj;
 }
開發者ID:jalvarez14,項目名稱:hva,代碼行數:30,代碼來源:BaseProveedorQuery.php

示例3: findPkSimple

 /**
  * Find object by primary key using raw SQL to go fast.
  * Bypass doSelect() and the object formatter by using generated code.
  *
  * @param     mixed $key Primary key to use for the query
  * @param     PropelPDO $con A connection object
  *
  * @return    Proveedor A model object, or null if the key is not found
  */
 protected function findPkSimple($key, $con)
 {
     $sql = 'SELECT `IDPROVEEDOR`, `NOMBRE` FROM `proveedor` WHERE `IDPROVEEDOR` = :p0';
     try {
         $stmt = $con->prepare($sql);
         $stmt->bindValue(':p0', $key, PDO::PARAM_INT);
         $stmt->execute();
     } catch (Exception $e) {
         Propel::log($e->getMessage(), Propel::LOG_ERR);
         throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);
     }
     $obj = null;
     if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
         $obj = new Proveedor();
         $obj->hydrate($row);
         ProveedorPeer::addInstanceToPool($obj, (string) $key);
     }
     $stmt->closeCursor();
     return $obj;
 }
開發者ID:nestorfsandoval,項目名稱:2012_pw2_tp2,代碼行數:29,代碼來源:BaseProveedorQuery.php


注:本文中的Proveedor::hydrate方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。