Hi,
I am very new to sql and more over GQL used in Google app engine. I have managed to push my data to the Google servers but I am not able to figure out a way to query from the entities I've loaded to the datastrore.
Here's the problem, i want to query only the names and numbers of a user's contacts marked by user id apart from other columns like given below,
Name Number User_id Country
Rob 0065114146 654351 singapore
Mark 0065132411 654351 singapore
Tina 0065221916 846611 singapore
Nick 0065214126 846611 singapore
This is my Models.py file in which I have my MyContacts Entity definition,
Class MyContacts(db.Model):
Name = db.StringProperty(required=True)
Number = db.PhoneNumberProperty(required=True)
User_id = db.IntegerProperty(required=True)
Country = db.StringProperty()
I am taking the user id as input from the UI but I am not able to figure out a way to bring up the data using the query. Please if any one can help me coin the query in GQL it would be a great help for me.
I've tried all sorts like SELECT * FROM MyContacts WHERE __key__ = KEY('user_id',654351)
but i get nothing.
Please help me out.