public function insert($query, array $data){        
        $this->conn->prepare($query)->execute($data);
        
        return $this->conn->lastInsertId();
    }
public function insert($query, array $data){        
        $this->conn->prepare($query)->execute($data);
        
        return $this->conn->lastInsertId();
    }
public function insert ( $ query , array $ data ) { $ this -> conn -> prepare ( $ query ) -> execute ( $ data ) ; return $ this -> conn -> lastInsertId ( ) ; }
Insert a record in the storage

@param string $query
@param array $data
@return string the last inserted id
Insert a record in the storage