22.11.2017, 13:02
Consegui jб, obrigado
Код:
gs_Buffer[0] = EOS; strcat(gs_Buffer, "CREATE TABLE IF NOT EXISTS `contas`("); for(new i; i < sizeof(TabelaPlayer); i ++) { strcat(gs_Buffer, fmat_return("%s %s %s%s", TabelaPlayer[i][tabela_nome], TabelaPlayer[i][tabela_tipo], TabelaPlayer[i][tabela_padrao], TabelaPlayer[i][tabela_fechamento])); } db_free_result(db_query(DatabaseBSP, gs_Buffer)); for(new i; i < sizeof(TabelaPlayer); i ++) { Result = db_query(DatabaseBSP, fmat_return("SELECT `%s` FROM `contas`;", TabelaPlayer[i][tabela_nome])); if(!db_num_rows(Result)) { db_free_result(db_query(DatabaseBSP, fmat_return("ALTER TABLE `contas` ADD %s %s %s;", TabelaPlayer[i][tabela_nome], TabelaPlayer[i][tabela_tipo], TabelaPlayer[i][tabela_padrao]))); } db_free_result(Result); }