acct......., TXN=NuAddPersona name=the3domo acct........ TXN=NuAddPersona u8 AddPersona(u8 *name) { unsigned int num_fields; MYSQL *conn; MYSQL_RES *result; MYSQL_ROW row; char query[500]; char *test = (char*)malloc(1024); char *test2 = (char*)malloc(1024); int test1; conn = sqlconn(); sprintf(query, "SELECT * FROM personanames WHERE `ip`='%s'", ip); mysql_query(conn, query); result = mysql_store_result(conn); num_fields = mysql_num_fields(result); while ((row = mysql_fetch_row(result))) { sprintf(test, "%s", row[2]); sprintf(test2, "%s", row[6]); } test1 = test; sprintf(query, "insert into personanames(name, personas, ip, profileId, userId, email) values('%s','%i','%s','%s','%s','%s');", name, ++test1, ip, 0, 0, test2); mysql_query(conn, query); }