Fetching the data By Using javascript sdk

7 views
Skip to first unread message

sarath maddukuri

unread,
Aug 13, 2013, 7:21:18 AM8/13/13
to stac...@googlegroups.com
Hi 

i want to fetch data from one schema to another schema

I have two schema's one is user schema and another schema is usergroups schema.

My requirement is I want to fetch data by using phone number from user schema so i am able to fetch the data
now in user schema there is a one column name called usergroups for that column it has one-to-many relationship to usergroups schema

i am retrieving usergroup column data from user schema by using phone number

so i want to get  data  by using usergroup column in user schema i want to retrieve groupname in usergroup schema

here is my code
$(window).load(function() { 
  StackMobExamples.fetchUser();
 });
 StackMobExamples['fetchUser'] = function(results) { 
 var phnumb=phone_number;
 alert(phnumb);
 var sendernumber=sender_number;
 alert(sendernumber);
 var users = new StackMob.Users (); 
 var q = new StackMob.Collection.Query();
 q.equals('phonenumber', sendernumber);
 users.query(q,{
 success: function(results) {
 console.debug('######################');
 console.debug('Number Of Resultts:'+results.length);
 results.each(function(user,i){
 

SidneyAllen

unread,
Aug 13, 2013, 6:32:51 PM8/13/13
to stac...@googlegroups.com
We are no longer monitoring this group.  We will respond to posts at http://community.stackmob.com

thanks
Reply all
Reply to author
Forward
0 new messages