add: keys[0]=user_column; keys[1]=group_column; keys[2]=domain_column; col[0]=group_column;
context: int is_user_in(struct sip_msg* _msg, char* _hf, char* _grp){	db_key_t keys[3] = {user_column, group_column, domain_column};	db_val_t vals[3];	db_key_t col[1] = {group_column};	db_res_t* res;	str uri;	int hf_type;	struct sip_uri puri;	struct hdr_field* h;	struct auth_body* c = 0; /* Makes gcc happy */		hf_type = (int)_hf;	switch(hf_type) {	case 1: /* Request-URI */		if (get_request_uri(_msg, &uri) < 0) {			LOG(L_ERR, "is_user_in(): Error while obtaining username from Request-URI\n");			return -1;		}		break;	case 2: /* To */		if (get_to_uri(_msg, &uri) < 0) {			LOG(L_ERR, "is_user_in(): Error while extracting To username\n");			return -2;		}		break;	case 3: /* From */		if (get_from_uri(_msg, &uri) < 0) {			LOG(L_ERR, "is_user_in(): Error while extracting From username\n");			return -3;		}		break;	case 4: /* Credentials */		get_authorized_cred(_msg->authorization, &h);		if (!h) {			get_authorized_cred(_msg->proxy_auth, &h);			if (!h) {				LOG(L_ERR, "is_user_in(): No authorized credentials found (error in scripts)\n");				return -1;			}		}			c = (auth_body_t*)(h->parsed);		break;	}	if (hf_type != 4) {		if (parse_uri(uri.s, uri.len, &puri) < 0) {			LOG(L_ERR, "is_user_in(): Error while parsing URI\n");			return -5;		}		VAL_STR(vals) = puri.user;		VAL_STR(vals + 2) = puri.host;	} else {		VAL_STR(vals) = c->digest.username.user;		VAL_STR(vals + 2) = (c->digest.username.domain.len) ? (c->digest.username.domain) : (c->digest.realm);	}		VAL_TYPE(vals) = VAL_TYPE(vals + 1) = VAL_TYPE(vals + 2) = DB_STR;	VAL_NULL(vals) = VAL_NULL(vals + 1) = VAL_NULL(vals + 2) = 0;	VAL_STR(vals + 1) = *((str*)_grp);		db_use_table(db_handle, table);	if (db_query(db_handle, keys, 0, vals, col, (use_domain) ? (3): (2), 1, 0, &res) < 0) {		LOG(L_ERR, "is_user_in(): Error while querying database\n");		return -5;	}		if (RES_ROW_N(res) == 0) {		DBG("is_user_in(): User is not in group \'%.*s\'\n", 		    ((str*)_grp)->len, ((str*)_grp)->s);		db_free_query(db_handle, res);		return -6;	} else {		DBG("is_user_in(): User is in group \'%.*s\'\n", 		    ((str*)_grp)->len, ((str*)_grp)->s);		db_free_query(db_handle, res);		return 1;	}}