O
Orchid Corpin
Guest
pvorobie is right, this is much easier if you want to get the children from a parent's view page, no more query. But since you are in a Generic Page you can't make use of that. I created a sample query from parent to child. You may change: warehouse = parent, product1 = child script //QUERY ALL PARENT rbf_selectQuery("SELECT name, id FROM warehouse", 5, my_callback); function my_callback(data) { for(i=0; i data.length; i++) { console.log("Parent ID: "+data[1]); console.log("Parent Name: "+data[0]); /* QUERY ALL CHILD FROM EACH PARENT WHERE = QUERY CHILDREN WHICH HAS SAME ID AS THE CURRENT PARENT R56036 = parent ID */ rbf_selectQuery("SELECT name, id, R56036 FROM product1 WHERE R56036='"+data[1]+"'", 10, function(child) { for(x=0; x child.length; x++) { console.log("Child ID of : "+child[x][2]+" : "+child[x][0]+" -- "+child[x][1]); } //END CHILDREN LOOP }); } //END ALL PARENT LOOP } /script Regards, Orchid
Continue reading...
Continue reading...