Hi,

I have a question, I am working with php and flashMX2004, in order to update
some MySQL tables, but my issue is to fill 2 list and one datagrid. For each
one the data comes from different tables and I used as follow:


********************** Functions ************************************

function cargarListaAparatos() {

d.filter = "All";
//Llenamos las listas
d.sendAndLoad("queryAparatos.php",d,"POST");
d.onLoad = function() {
var j;
var sLabel;
lstAparatos.removeAll();

for (j=0; j < this.n; j++) {
lstAparatos.addItem({label:this["NombreAparato"+j],data:this["id"+j]});
}
}

}
function cargarNiveles() {

e.filter = "All";
//Llenamos las listas
e.sendAndLoad("queryNiveles.php",e,"POST");
e.onLoad = function() {
var j;
var sLabel;
lstAparatos.removeAll();

for (j=0; j < this.n; j++) {
lstAparatos.addItem({label:this["Nivel"+j],data:this["id"+j]});
}
}

}
//************************************** Begin Program
*****************************************
mx.accessibility.ListAccImpl.enableAccessibility() ;
var c = new LoadVars();
var d = new LoadVars();
var e = new LoadVars();
cargarDatos();
cargarListaAparatos();
cargarListaNiveles();
stop();

************************************** End
********************************************
Ok, my lists and datagrid are filled, but I would like to know if this is the
best way (define for each php query have a LoadVars variable??? or may be
existe a better way to do that...

any help is welcome...Carlos