original_string: protected function getRecord($tableName, $where = null)
      {
          $record = $this->database->table($tableName)->order('RAND()');
          return $where ?
              $record->where($where)->limit(1)->fetch() :
              $record->limit(1)->fetch();
      }
code: protected function getRecord($tableName, $where = null)
      {
          $record = $this->database->table($tableName)->order('RAND()');
          return $where ?
              $record->where($where)->limit(1)->fetch() :
              $record->limit(1)->fetch();
      }
code_tokens: protected function getRecord ( $ tableName , $ where = null ) { $ record = $ this -> database -> table ( $ tableName ) -> order ( 'RAND()' ) ; return $ where ? $ record -> where ( $ where ) -> limit ( 1 ) -> fetch ( ) : $ record -> limit ( 1 ) -> fetch ( ) ; }
docstring: Returns random record from given table.
  @param string $tableName
  @return IRow|false
docstring_tokens: Returns random record from given table .