render_sql for OptionsConnector

I use OptionsConnector for load data to liteboxe’s select,
but i need use sql query:

$list = new OptionsConnector($res);
$list->render_sql(“select * from class where corp = 1”,“class”,“сlass_id(value),name(label)”);

return empty rows:

construction $list->render_sql(“select * from class where corp = 1”,“class”,“сlass_id ,name”);
return ok, but incorrect rows names:

How try to use render_sql?


Try to use

$list->render_sql("select *, class_id as value, name as label from class where corp = 1","class","сlass_id(value),name(label)");