示例#1
0
 private static function _getRows($sql, $sqlParams)
 {
     if ($num = strpos(strtoupper($sql), 'ORDER')) {
         $countSql = substr($sql, 0, $num);
     } else {
         $countSql = $sql;
     }
     $countSql = 'SELECT COUNT(*) ' . stristr($countSql, 'FROM');
     self::$totalRows = parent::getOne_($countSql, $sqlParams, 0);
 }
示例#2
0
 public function getOne($id, $field = '*')
 {
     $sqlArr = parent::getSelectSql_($id, $field, $join = array());
     return parent::getOne_($sqlArr['sql'], $sqlArr['params']);
 }