/** * @param string $table The table to insert into * @param array $data The data to add * @return int The id of the last inserted row */ public function insert($table, array $data) { $query = Peyote::insert($table)->columns(\array_keys($data))->values(\array_values($data)); $this->runQuery($query); return (int) $this->pdo->lastInsertId(); }
public function testDelete() { $this->assertInstanceOf("\\Peyote\\Delete", Peyote::delete('test')); }