string sql;
connectionNOC = mysql_init(NULL);
mysql_real_connect(connectionNOC,hostbase,userbase,passbase,namebase,3306,0,0)
sql ="use noc";
if (mysql_query(connectionNOC, sql.c_str()) != 0){fprintf(stderr,"Error: can't execute SQL-query\n");exit(1);};
result=mysql_store_result(connectionNOC);
// Шаг 1
sql ="SET NAMES utf8";
if (mysql_query(connectionNOC, sql.c_str()) != 0){fprintf(stderr,"Error: can't execute SQL-query\n");exit(1);};
result=mysql_store_result(connectionNOC);
// Шаг 2
sql="select * from lanbshconfig";
if (mysql_query(connectionNOC, sql.c_str()) != 0){
fprintf(stderr,"Error: can't execute SQL-query %s\n",mysql_error(connectionNOC));
exit(1);
};