Conditions | 1 |
Paths | 1 |
Total Lines | 7 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
53 | public function totalNumberPostsByAuthor(int $authorid):int |
||
54 | { |
||
55 | $sql = "SELECT COUNT(*) FROM $this->postsTbl WHERE published = 1 AND author_iduser = :authorId "; |
||
56 | $this->query($sql); |
||
57 | $this->bind(":authorId", $authorid, \PDO::PARAM_INT); |
||
58 | $this->execute(); |
||
59 | return $this->stmt->fetchColumn(); |
||
60 | } |
||
61 | } |