我有一个名为product的表,想要执行数据透视操作并查找以下结果:
OutPut要求:
如何在具有三个字段的SQL中进行Pivot?
答案 0 :(得分:0)
var Obj = function() {
this.property = 1;
this.arr = [...] // array containing elements we want to add event listeners to
for (...) {
this.arr[i].addEventListener("click", this.listener, false);
}
}
Obj.prototype.listener = function() {
console.log( this.property ); // DOES NOT WORK! *this* does not point to Obj.
}
var a = new Obj();