combo loaded with render_sql and display form data


Friends need your help …

I’m new to using these APIs and when I’m doing the following

$ filter1 = new OptionsConnector ($ res);
$ filter1-> render_table (“countries”, “country_id”, “country_name (value), otro_valor (label)”);
$ grid-> set_options (“item_nm” $ filter1);

works perfectly achieved with render_table cargarmen filter and a combo with all values

but when I use so

$ filter1 = new OptionsConnector ($ res);
$ filter1-> render_sql (“SELECT * from advisers Where id_asesor = '2 '” id_asesor “,” cod (value), name (label) ");
$ grid-> set_options (“name”, $ filter1);

With render_sql does not return data in the combo …


Correct syntax is

$ filter1-> render_sql (“SELECT cod as value, name as label from advisers Where id_asesor = ‘2’ “,””,“value,label”);

Thanks friend, excellent work aunq me now I face another problem but excellent reply