The key is not passing, neither is the key's value. If I put in hard values, it works, but not with the key. That, and is there a way to put the query outside and do it just once, instead of with each loop?