original_string: public function tryLoadRandom()
      {
          // get ID first
          $id = $this->dsql()->order('rand()')->limit(1)->field($this->getElement($this->id_field))->getOne();
          if ($id) {
              $this->load($id);
          }
  
          return $this;
      }
code: public function tryLoadRandom()
      {
          // get ID first
          $id = $this->dsql()->order('rand()')->limit(1)->field($this->getElement($this->id_field))->getOne();
          if ($id) {
              $this->load($id);
          }
  
          return $this;
      }
code_tokens: public function tryLoadRandom ( ) { // get ID first $ id = $ this -> dsql ( ) -> order ( 'rand()' ) -> limit ( 1 ) -> field ( $ this -> getElement ( $ this -> id_field ) ) -> getOne ( ) ; if ( $ id ) { $ this -> load ( $ id ) ; } return $ this ; }
docstring: Loads random entry into model
docstring_tokens: Loads random entry into model