// set up prepared statements for the whole class private fuction setUpPreparedStatements(){ // called in constructor // insert site $this->statements['newsite'] = $this->dbh(->prepare("INSERT INTO sites (title, url) VALUES (:title, :url)"); $this->statements['newsite']->bindParam(':title', $title); $this->statements['newsite']->bindParam(':url', $url); } // insert new site public function insertNewSite($sitename, $url){ $this->statments['newsite']->execute(); }