Create 2 global variables to store each of your 2 different database
queries.

For example:

var query1 = new
google.visualization.Query('http://spreadsheets.google.com?key=123AB&;...');

var query2 = new
google.visualization.Query('http://spreadsheets.google.com?key=123AB&;...');


That should get you up and running if you create 2 separate queries and use
1 query for 1 of your tables and the 2nd for the other table.  Then you just
use query1.setQuery and query2.setQuery.  That should allow you to
distinguish between the 2 different queries.

On Tue, Jul 6, 2010 at 12:02 PM, Student <[email protected]> wrote:

> I am sorry my requirement is like:
> 1st take data from user then draw chart accrodingly(say annoted chart)
> now if a user wants he can remove or add columns ....i do that by
> giving query.setQuery.......
> now the same user wants the annoted diagram on different page with
> different dataset so i provide him that option.
> But when i do so he is not able to add remove columns from chart .....
> using  query.setQuery
> The reason i found was , all tough we can draw the new chart but when
> I try to add remove columns by using  query.setQuery()
> I get an error that such "feild" does not exsist....... bcoz it tries
> the query.setQuery function on the previous diagram that i drew ......
> and as the two diagrams at two different pages
> have completly different columns .... i am not able to do
> query.setQuery() on new diagram drawn....... i figured that each json
> response has unique sid: .... so there might be a way to tell the
> query.setquery() to fetch data from new json reponse and not the old
> one.
> Is there a way to do that?
>
> On Jul 6, 11:55 am, Nathan Raley <[email protected]> wrote:
> > You're storing your queries as 2 different variables right?
> >
> > Are you following the steps shown in:
> http://code.google.com/apis/visualization/documentation/queries.html
> >
> > <http://code.google.com/apis/visualization/documentation/queries.html
> >All
> > you need is to do this for 2 different queries as 2 different variables
> and
> > create a function to handle your query response to populate the table
> with
> > the information returned in your query.
> >
> >
> >
> > On Tue, Jul 6, 2010 at 10:44 AM, Student <[email protected]> wrote:
> >
> > > If we execute to different query   two different charts are drawn but
> > > how do I requery to different charts?
> > > Can i do that using reqid: and sig:  ?
> > > I am new to web programming can u explain how to use this feature to
> > > uniquely query to different diagrams?
> > > On Jul 2, 12:15 pm, Nathan Raley <[email protected]> wrote:
> > > > You could try using the 2 queries to populate two different google
> data
> > > > tables and then try using the data table for your queries instead of
> the
> > > > actual json query.  That would be my next suggestions.  I haven't
> done
> > > much
> > > > work with json queries like you are using since my needs were a bit
> > > > different than yours for pulling the information, I had an embedded
> > > > tcppwebbrowser object which I could use to perform my queries and
> then it
> > > > was a matter of sending them to the javascript and using the google
> data
> > > > tables to manipulate my information.  They were very easy to work
> with so
> > > > you might try and give it a go, shouldn't take you but a second or
> two to
> > > > set them up and that might help keep your json queries from getting
> mixed
> > > > up.
> >
> > > > On Fri, Jul 2, 2010 at 10:55 AM, Student <[email protected]>
> wrote:
> > > > > Nope, the new session idea is not working either.
> > > > > I even tried to open new queried  charts on new browser, but it
> seems
> > > > > that the new json string generated overwrite the old json foramt.
> > > > > Hence we cannot requery on the old diagram in the page.
> > > > > However If the new  charts are drawn with same json string and data
> > > > > format we can have multiple  charts with different select quires on
> > > > > them.
> > > > > That is how google finance charts works... since it has the same
> query
> > > > > table in json formt and we are playing on top of that by clicking
> > > > > combobox.
> > > > > Well this are my thoughts....but  I am really eager to know the
> exact
> > > > > problem..
> > > > > If there's any other way by which we can handle the situation ?
> >
> > > > > On Jul 2, 11:25 am, Nathan Raley <[email protected]> wrote:
> > > > > > Hmm, your suggestion that it may be a session issue could be
> what's
> > > > > causing
> > > > > > this.  Have you given that a try yet?  It would definitely be
> worth
> > > > > trying
> > > > > > out.
> >
> > > > > > On Fri, Jul 2, 2010 at 10:17 AM, Student <[email protected]>
> > > wrote:
> > > > > > > The project is on personal domain so we cannot access the site
> > > > > > > remotely .
> > > > > > > My question is just that If we draw a chart and we re-quiery on
> it
> > > > > > > using url, we can remove any data column we can(select
> > > > > > > column1,column3).
> > > > > > > But when we draw a new chart(with new table query from mysqldb)
> > > > > > > altogether in the same browser  and re-quiery it to remove a
> column
> > > we
> > > > > > > are still sucessfull(select newcol1,newcol2).
> > > > > > > But now on the previous chart we cannot requiery since the temp
> > > json
> > > > > > > is over returned by new chart.
> > > > > > > Thus we get internal query error in the previous chart(now if i
> go
> > > to
> > > > > > > previous chart tab and do select column1,column2 ...say ).
> >
> > > > > > > On Jul 2, 9:56 am, Nathan Raley <[email protected]> wrote:
> > > > > > > > Do you have a reference that we can look at for your work to
> see
> > > what
> > > > > > > > exactly your doing and how your doing it compared to the site
> > > your
> > > > > using
> > > > > > > as
> > > > > > > > an example?  That might help us diagnose issues quicker.  It
> > > could be
> > > > > a
> > > > > > > > number of things that could be causing this.
> >
> > > > > > > > On Fri, Jul 2, 2010 at 8:43 AM, Student <
> [email protected]>
> > > > > wrote:
> >
> > > > >
> http://www.google.com/finance?q=INDEXDJX:.DJI,INDEXSP:.INX,INDEXNASDA.
> > > > > > > ..
> > > > > > > > > I have made checkbox as in the above site to remove or add
> > >  dataset
> > > > > as
> > > > > > > > > selected.
> > > > > > > > > The problem I am facing is
> > > > > > > > > In my browser  when I draw diagram on query A I can play
> with
> > > > > > > > > checkbox's easily .... on that chart.
> > > > > > > > > But when I draw one more chart on different tab with query
> B I
> > > can
> > > > > see
> > > > > > > > > new chart drawn perfectly, but when I select
> > > > > > > > > and checkbox to remove a datacolumn it gives me internal
> > > > > error(seems
> > > > > > > > > as if the query is gettinng processed on the old chart and
> not
> > > the
> > > > > new
> > > > > > > > > one)
> > > > > > > > > And since the two charts are different altogether I always
> get
> > > an
> > > > > > > > > internal query error on second chart bcoz on the same
> browser
> > > it is
> > > > > > > > > trying to query the old json string
> > > > > > > > > Is there any solution to it?
> > > > > > > > > I wonder if I can draw new charts altogether with different
> > > queiry
> > > > > , I
> > > > > > > > > should be able to requery the new chart drawn and it should
> not
> > > > > > > > > reference to the old charts json string.
> > > > > > > > > I am drawing all the diagrams in the same session.....
> should I
> > > > > create
> > > > > > > > > new session for new chart drawn and then the checkbox query
> > > will
> > > > > work
> > > > > > > > > properly?
> > > > > > > > > Regards
> > > > > > > > > Akku
> >
> > > > > > > > > --
> > > > > > > > > You received this message because you are subscribed to the
> > > Google
> > > > > > > Groups
> > > > > > > > > "Google Visualization API" group.
> > > > > > > > > To post to this group, send email to
> > > > > > > > > [email protected].
> > > > > > > > > To unsubscribe from this group, send email to
> > > > > > > > > [email protected]<google-visualization-api%[email protected]><google-visualization-
> api%[email protected] <api%[email protected]>
> ><google-visualization-
> > > api%[email protected]<api%[email protected]><
> api%[email protected]<api%[email protected]>
> >
> > > ><google-visualization-
> > > > > api%[email protected]<api%[email protected]>
> <api%[email protected]<api%[email protected]>
> ><
> > > api%[email protected]<api%[email protected]>
> <api%[email protected]<api%[email protected]>>
> >
> > > > > ><google-visualization-
> > > > > > > api%[email protected]<api%[email protected]>
> <api%[email protected]<api%[email protected]>
> >
> > > <api%[email protected]<api%[email protected]>
> <api%[email protected]<api%[email protected]>m>
> > > ><
> > > > > api%[email protected]<api%[email protected]>
> <api%[email protected]<api%[email protected]>>
> > > <api%[email protected]<api%[email protected]>
> <api%2525252bunsubscr...@googlegroup s.com>>
> >
> > > > > > > > > .
> > > > > > > > > For more options, visit this group at
> > > > > > > > >
> http://groups.google.com/group/google-visualization-api?hl=en.
> >
> > > > > > > --
> > > > > > > You received this message because you are subscribed to the
> Google
> > > > > Groups
> > > > > > > "Google Visualization API" group.
> > > > > > > To post to this group, send email to
> > > > > > > [email protected].
> > > > > > > To unsubscribe from this group, send email to
> > > > > > > [email protected]<google-visualization-api%[email protected]><google-visualization-
> api%[email protected] <api%[email protected]>
> ><google-visualization-
> > > api%[email protected]<api%[email protected]><
> api%[email protected]<api%[email protected]>
> >
> > > ><google-visualization-
> > > > > api%[email protected]<api%[email protected]>
> <api%[email protected]<api%[email protected]>
> ><
> > > api%[email protected]<api%[email protected]>
> <api%[email protected]<api%[email protected]>>
> >
> > > > > > > .
> > > > > > > For more options, visit this group at
> > > > > > >http://groups.google.com/group/google-visualization-api?hl=en.
> >
> > > > > --
> > > > > You received this message because you are subscribed to the Google
> > > Groups
> > > > > "Google Visualization API" group.
> > > > > To post to this group, send email to
> > > > > [email protected].
> > > > > To unsubscribe from this group, send email to
> > > > > [email protected]<google-visualization-api%[email protected]><google-visualization-
> api%[email protected] <api%[email protected]>
> ><google-visualization-
> > > api%[email protected]<api%[email protected]><
> api%[email protected]<api%[email protected]>
> >>
> > > > > .
> > > > > For more options, visit this group at
> > > > >http://groups.google.com/group/google-visualization-api?hl=en.
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "Google Visualization API" group.
> > > To post to this group, send email to
> > > [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected]<google-visualization-api%[email protected]><google-visualization-
> api%[email protected] <api%[email protected]>>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/google-visualization-api?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Visualization API" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-visualization-api%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-visualization-api?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.

Reply via email to