original_string: public function getOneById($id)
      {
          $id = (string)$id;
  
          $fields = implode(', ', $this->fields);
          $sql = 'SELECT ' . $fields . ' FROM ' . $this->table . ' WHERE ' . $this->table . '.id = :id';
          $query = $this->pdo->prepare($sql);
          $query->bindParam(':id', $id);
          $query->execute();
  
          return $query->fetch(PDO::FETCH_ASSOC);
      }
code: public function getOneById($id)
      {
          $id = (string)$id;
  
          $fields = implode(', ', $this->fields);
          $sql = 'SELECT ' . $fields . ' FROM ' . $this->table . ' WHERE ' . $this->table . '.id = :id';
          $query = $this->pdo->prepare($sql);
          $query->bindParam(':id', $id);
          $query->execute();
  
          return $query->fetch(PDO::FETCH_ASSOC);
      }
code_tokens: public function getOneById ( $ id ) { $ id = ( string ) $ id ; $ fields = implode ( ', ' , $ this -> fields ) ; $ sql = 'SELECT ' . $ fields . ' FROM ' . $ this -> table . ' WHERE ' . $ this -> table . '.id = :id' ; $ query = $ this -> pdo -> prepare ( $ sql ) ; $ query -> bindParam ( ':id' , $ id ) ; $ query -> execute ( ) ; return $ query -> fetch ( PDO :: FETCH_ASSOC ) ; }
docstring: Run a SELECT query by ID
  @param int|string $id The id of the record you want to retrieve
  @return mixed Query result
  @since 1.1.4
docstring_tokens: Run a SELECT query by ID