我使用鈦上市量的數量,可以在特定的產品,我現在用的查詢 「SELECT PRODUCT_NAME,SUM(product_quantity)FROM mobile_product GROUP BY PRODUCT_NAME」 ..添加查詢到鈦
我在將這個查詢實現給Titanium JS時感到困惑。
我二代碼
var currentWin = Ti.UI.currentWindow;
var sendit = Ti.Network.createHTTPClient();
sendit.open('GET', 'http://localhost/mobileapp/productread.php');
sendit.send();
sendit.onload = function(){
var json = JSON.parse(this.responseText);
var json = json.mobile_product;
var picker = Ti.UI.createPicker();
// turn on the selection indicator (off by default)
picker.selectionIndicator = true;
var data = [];
var pos;
for (pos=0; pos < json.length; pos++) {
data.push (Ti.UI.createPickerRow({title:''+ json[pos].product_name + '',custom_item:'b'}));
}
picker.add(data);
currentWin.add(picker);
//var rw = db.execute("SELECT product_name, SUM(product_quantity)FROM mobile_product GROUP BY product_name");
picker.addEventListener("change", function(e){
Ti.API.info(''+ json[pos].product_name + '');
})
};
請有人幫助我,我怎麼能使用此查詢在此代碼...我使用JSON從phpMyAdmin來解析....
能有人幫我出這個????????? – user1562991 2012-07-30 14:06:03
評論不會幫助你。這是鈦桌面? – 2012-07-30 15:51:39