$query=prepare(" UPDATE calendar_events SET title = :title, description = :description, start = :start, end = :end, url = :url, color =:color WHERE id = :id");
$query->bindValue(':id',$id);
$query->bindValue(':title',$title);
$query->bindValue(':description',$description);
$query->bindValue(':start',$start);
$query->bindValue(':end',$end);
$query->bindValue(':url',$url);
$query->bindValue(':color',$color);
$query->execute()orerror(db_error($query));
break;
default:
}
}elseif($method=='GET'){
// Method is GET
$query=query("SELECT * FROM calendar_events ORDER BY id")orerror(db_error());