fork download
  1. <?php
  2.  
  3. public function getAll($sort, $start, $limit)
  4. {
  5. $sql = "SELECT
  6. name, second_name, group_number, summary
  7. FROM
  8. students
  9. ORDER BY :sort LIMIT :start, :limit";
  10. $sth = $this->dbh->prepare($sql);
  11. $sth->bindValue(":sort", $sort);
  12. $sth->bindValue(":start", $start);
  13. $sth->bindValue(":limit", $limit);
  14. $sth->execute();
  15. return $sth->fetchAll(\PDO::FETCH_CLASS, 'models\Student');
  16. }
Runtime error #stdin #stdout #stderr 0s 82880KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
PHP Parse error:  syntax error, unexpected 'public' (T_PUBLIC), expecting end of file in /home/7MPDlc/prog.php on line 3