Example #1
0
 public function Create()
 {
     $connect = new PDO('mysql:host=localhost;dbname=blog', 'root', '4fhc9imz');
     $statement = $connect->prepare("INSERT INTO " . self::tableName() . "(tag)VALUES(?)");
     $statement->execute(array($this->name));
     $this->id = $connect->LastInsertId();
 }