About fusion table

25 views
Skip to first unread message

Denise Ong

unread,
Apr 30, 2016, 4:08:47 AM4/30/16
to mitappinv...@googlegroups.com
Hi may i know how do i control the fusion table from refreshing out the same data . Because at first i put this data in tiny db and put it as a form of fusion table . When i go press the chart screen , it will just have another row which has the same data. how do i prevent it from repeating the same data ? Thankyou. 
IMG_4206.jpg
IMG_4207.jpg

Taifun

unread,
Apr 30, 2016, 10:12:48 AM4/30/16
to MIT App Inventor Forum
first send a SELECT statement to the table like this

SELECT * FROM <tableid> WHERE Date = <date you like to insert> AND Joint = 'joint you like to insert' AND ROM = <rom you like to insert> AND Result = <result you like to insert>


then get back the result of the query in the fusiontable control got result event, there are 2 possible results:
1. you get only the header row of the table back, which means, the row still does not exist, then send an INSERT statement to the table
2. you get the header row and a data row back, which means, the row already is there, then do nothing

Taifun

Trying to push the limits of App Inventor! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun. 

Denise Ong

unread,
Apr 30, 2016, 10:18:54 AM4/30/16
to MIT App Inventor Forum
Sorry because im a beginner for this . I dont quite understand what do you mean ):

Denise Ong

unread,
Apr 30, 2016, 10:20:24 AM4/30/16
to MIT App Inventor Forum
And also all this data is not fixed , it may changes . I couldn't jus select the date = something right??

Taifun

unread,
Apr 30, 2016, 1:22:05 PM4/30/16
to MIT App Inventor Forum
you should do it step by step
it seems to be, you are trying a lot of things in parallel and then you get lost easily
concentrate always on the next step, test that step and only if you got this working, then continue to the next step
see also 

in this case the first step is to find out, if the row you like to insert is already available in the table
SELECT * FROM <tableid> WHERE Date = <date you like to insert> AND Joint = 'joint you like to insert' AND ROM = <rom you like to insert> AND Result = <result you like to insert>

and if you get an error, then first see here 
there is also a chapter "I tried everything, what can I do now"...
If you checked for all the Frequent Made Errors and the error message doesn't tell you anything to fix this, open a new thread in the MIT App Inventor forum and add a screenshot of your SQL statement including the "Do it" result and a screenshot of your error message and I will try to help you. Thank you.       

let's first continue with this task and if you get this running, then let's take a look at the DELETE task


Taifun
Reply all
Reply to author
Forward
0 new messages