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


PHP DatabaseManager::singleFetchAssoc方法代码示例

本文整理汇总了PHP中DatabaseManager::singleFetchAssoc方法的典型用法代码示例。如果您正苦于以下问题:PHP DatabaseManager::singleFetchAssoc方法的具体用法?PHP DatabaseManager::singleFetchAssoc怎么用?PHP DatabaseManager::singleFetchAssoc使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DatabaseManager的用法示例。


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

示例1: getSingleConfirmation

 /**
  * Recover from database one Confirmation object by id
  * 
  * @author Jonathan Sandoval <jonathan_s_pisis@yahoo.com.mx>
  * @param  string            $key           key to search
  * @param  string            $value         value of the key
  * @param  string            $key2          Other Key to search
  * @param  string            $value2        Other Value of the key
  * @return Confirmation  $confirmation      Confirmation result or null
  */
 static function getSingleConfirmation($key = 'id', $value = '', $key2 = '', $value2 = '')
 {
     if ($value === '') {
         return null;
     }
     $tableConfirmation = DatabaseManager::getNameTable('TABLE_CONFIRMATION');
     $query = "SELECT {$tableConfirmation}.*\r\n                           FROM {$tableConfirmation} \r\n                           WHERE {$tableConfirmation}.{$key} = '{$value}'";
     if ($key2 !== '') {
         $query = $query . "AND {$tableConfirmation}.{$key2} = '{$value2}'";
     }
     $confirmation = DatabaseManager::singleFetchAssoc($query);
     $confirmation = self::ArrayToConfirmation($confirmation);
     return $confirmation;
 }
开发者ID:jonatalamantes,项目名称:NotariusAdOmnes,代码行数:24,代码来源:ConfirmationManager.php

示例2: getSingleDefuntion

 /**
  * Recover from database one Defuntion object by id
  * 
  * @author Jonathan Sandoval <jonathan_s_pisis@yahoo.com.mx>
  * @param  string  $key       key to search
  * @param  string  $value     value of the key
  * @return Defuntion  $defuntion      Defuntion result or null
  */
 static function getSingleDefuntion($key = 'id', $value = '')
 {
     if ($value === '') {
         return null;
     }
     $tableDefuntion = DatabaseManager::getNameTable('TABLE_DEFUNTION');
     $query = "SELECT {$tableDefuntion}.*\r\n                           FROM {$tableDefuntion} \r\n                           WHERE {$tableDefuntion}.{$key} = '{$value}'";
     $defuntion = DatabaseManager::singleFetchAssoc($query);
     $defuntion = self::ArrayToDefuntion($defuntion);
     return $defuntion;
 }
开发者ID:jonatalamantes,项目名称:NotariusAdOmnes,代码行数:19,代码来源:DefuntionManager.php

示例3: getSingleBaptism

 /**
  * Recover from database one Baptism object by id
  * 
  * @author Jonathan Sandoval <jonathan_s_pisis@yahoo.com.mx>
  * @param  string   $key          Key to search
  * @param  string   $value        Value of the key
  * @return Baptism  $baptism      Baptism result or null
  */
 static function getSingleBaptism($key = 'id', $value = '')
 {
     if ($value === '') {
         return null;
     }
     $tableBaptism = DatabaseManager::getNameTable('TABLE_BAPTISM');
     $query = "SELECT {$tableBaptism}.*\r\n                           FROM {$tableBaptism} \r\n                           WHERE {$tableBaptism}.{$key} = '{$value}'";
     $baptism = DatabaseManager::singleFetchAssoc($query);
     $baptism = self::ArrayToBaptism($baptism);
     return $baptism;
 }
开发者ID:jonatalamantes,项目名称:NotariusAdOmnes,代码行数:19,代码来源:BaptismManager.php

示例4: getSingleChurch

 /**
  * Recover from database one Church object by id
  * 
  * @author Jonathan Sandoval <jonathan_s_pisis@yahoo.com.mx>
  * @param  string  $key       Key to search
  * @param  string  $value     Value of the key
  * @return Church  $church    Church result or null
  */
 static function getSingleChurch($key = 'id', $value = '')
 {
     if ($value === '') {
         return null;
     }
     $tableChurch = DatabaseManager::getNameTable('TABLE_CHURCH');
     $query = "SELECT {$tableChurch}.*\r\n                           FROM {$tableChurch} \r\n                           WHERE {$tableChurch}.{$key} = '{$value}'";
     $church = DatabaseManager::singleFetchAssoc($query);
     $church = self::ArrayToChurch($church);
     return $church;
 }
开发者ID:jonatalamantes,项目名称:NotariusAdOmnes,代码行数:19,代码来源:ChurchManager.php

示例5: getLastIDPaperConfig

 /**
  * Recover the last ID from the database of paper config
  * 
  * @author Jonathan Sandoval <jonathan_s_pisis@yahoo.com.mx>
  * @return integer         The last id on the database of paper config
  */
 static function getLastIDPaperConfig()
 {
     $tablePaperConfig = DatabaseManager::getNameTable('TABLE_PAPER_CONFIG');
     $query = "SELECT MAX(id) AS Max FROM {$tablePaperConfig}";
     return DatabaseManager::singleFetchAssoc($query)["Max"];
 }
开发者ID:jonatalamantes,项目名称:NotariusAdOmnes,代码行数:12,代码来源:SessionManager.php

示例6: getSingleProofTalks

 /**
  * Recover from database one ProofTalks object by id
  * 
  * @author Jonathan Sandoval <jonathan_s_pisis@yahoo.com.mx>
  * @param  string  $key         Key to search
  * @param  string  $value       Value of the key
  * @param  string  $key2        Other Key to search
  * @param  string  $value2      Other Value of the key
  * @param  string  $key3        Other Key to search
  * @param  string  $value3      Other Value of the key
  * @param  string  $key4        Other Key to search
  * @param  string  $value4      Other Value of the key
  * @return ProofTalks  $myProofTalks   proofTalks result or null
  */
 static function getSingleProofTalks($key = 'id', $value = 0, $key2 = '', $value2 = '', $key3 = '', $value3 = '', $key4 = '', $value4 = '')
 {
     if ($value === '') {
         return null;
     }
     $tableProofTalks = DatabaseManager::getNameTable('TABLE_PROFF_TALKS');
     $query = "SELECT {$tableProofTalks}.*\r\n                           FROM {$tableProofTalks} \r\n                           WHERE {$tableProofTalks}.{$key} = '{$value}'";
     if ($key2 !== '') {
         $query = $query . "AND {$tableProofTalks}.{$key2} = '{$value2}'";
     }
     if ($key3 !== '') {
         $query = $query . "AND {$tableProofTalks}.{$key3} = '{$value3}'";
     }
     if ($key4 !== '') {
         $query = $query . "AND {$tableProofTalks}.{$key4} = '{$value4}'";
     }
     $myProofTalks = DatabaseManager::singleFetchAssoc($query);
     $myProofTalks = self::ArrayToProofTalks($myProofTalks);
     return $myProofTalks;
 }
开发者ID:jonatalamantes,项目名称:NotariusAdOmnes,代码行数:34,代码来源:ProofManager.php

示例7: getSingleCity

 /**
  * Recover from database one City object by id
  * 
  * @author Jonathan Sandoval <jonathan_s_pisis@yahoo.com.mx>
  * @param  string  $key       key to search
  * @param  string  $value     value of the key
  * @return City    $city      City result or null
  */
 static function getSingleCity($key = 'id', $value = '')
 {
     if ($value === '') {
         return null;
     }
     $tableCity = DatabaseManager::getNameTable('TABLE_CITY');
     $query = "SELECT {$tableCity}.*\n                          FROM {$tableCity} \n                          WHERE {$tableCity}.{$key} = '{$value}'";
     $city = DatabaseManager::singleFetchAssoc($query);
     $city = self::ArrayToCity($city);
     return $city;
 }
开发者ID:jonatalamantes,项目名称:NotariusAdOmnes,代码行数:19,代码来源:CityManager.php

示例8: getLastID

 /**
  * Recover the last ID from the database
  * 
  * @author Jonathan Sandoval <jonathan_s_pisis@yahoo.com.mx>
  * @return integer         The last id on the database
  */
 static function getLastID()
 {
     $tablePerson = DatabaseManager::getNameTable('TABLE_PERSON');
     $query = "SELECT MAX(id) AS Max FROM {$tablePerson}";
     return DatabaseManager::singleFetchAssoc($query)["Max"];
 }
开发者ID:jonatalamantes,项目名称:NotariusAdOmnes,代码行数:12,代码来源:PersonManager.php

示例9: getLastID

 /**
  * Get the last ID from the database
  * 
  * @author Jonathan Sandoval <jonathan_s_pisis@yahoo.com.mx>
  * @return boolean           If was possible to delete
  */
 static function getLastID()
 {
     $tableRector = DatabaseManager::getNameTable('TABLE_RECTOR');
     $query = "SELECT MAX(id) AS Max FROM {$tableRector}";
     return DatabaseManager::singleFetchAssoc($query)["Max"];
 }
开发者ID:jonatalamantes,项目名称:NotariusAdOmnes,代码行数:12,代码来源:RectorManager.php

示例10: getSingleMarriage

 /**
  * Recover from database one Marriage object by id
  * 
  * @author Jonathan Sandoval <jonathan_s_pisis@yahoo.com.mx>
  * @param  string  $key       key to search
  * @param  string  $value     value of the key
  * @return Marriage  $marriage      Marriage result or null
  */
 static function getSingleMarriage($key = 'id', $value = '', $key2 = '', $value2 = '')
 {
     if ($value === '') {
         return null;
     }
     $tableMarriage = DatabaseManager::getNameTable('TABLE_MARRIAGE');
     $query = "SELECT {$tableMarriage}.*\r\n                           FROM {$tableMarriage} \r\n                           WHERE {$tableMarriage}.{$key} = '{$value}'";
     if ($key2 !== '') {
         $query = $query . "AND {$tableMarriage}.{$key2} = '{$value2}'";
     }
     $marriage = DatabaseManager::singleFetchAssoc($query);
     $marriage = self::ArrayToMarriage($marriage);
     return $marriage;
 }
开发者ID:jonatalamantes,项目名称:NotariusAdOmnes,代码行数:22,代码来源:MarriageManager.php


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