예제 #1
0
파일: Table.php 프로젝트: leegons/testspace
 /**
  * get one result by select contidion
  * @param array $select sql condition
  * @return boolean|Ambigous <boolean, multitype:array, multitype:>
  */
 public function getOne($select)
 {
     if (!$select || count($select) <= 0) {
         return false;
     }
     $sql = 'SELECT * FROM ' . $this->tablename . ' WHERE ' . Common_Db_Util::splice('AND', $select) . 'LIMIT 1';
     return Common_Db_Base::fetch($sql);
 }