2014년 12월 30일 화요일

How to Query a Fusion Table?


We are having success with AppInventor but we are now stuck. We built the pizza app and are able to populate a fusion table. In a separate app we are able to view the data in the table. What I am asking students to do next is to query that database and return the result to the tablet.

A simple query is what I want them accomplish. For example:

If pizza = 'pepperoni' than return that row.  

Data (Pizza Type) is to be selected from a list, which we can view, the query submitted - via a button - to the table and the values returned to the screen.

Problem is we do not know where to start. I have researched the forums, asked the Internet, etc. and am stumped/confused. Just need a place to the students to begin.

--

you need a SELECT query
SELECT * FROM <tableid> WHERE Pizza = <Listpicker.Selection>


--
Here are the docs for the Fusion Table control...http://ai2.appinventor.mit.edu/reference/components/storage.html#FusionTablesControl

You will have to use the GetRowsWithConditions block to query the table and extract specific rows that match the conditions...

We are having success with AppInventor but we are now stuck. We built the pizza app and are able to populate

--

댓글 없음:

댓글 쓰기