SQL - syntax error

hi…
Another newbie question…
I put this script into button:
function () {
return document.childByName(“Table3”).sqlQuery=“SELECT field1 FROM data ORDER BY “pma_id” ASC LIMIT 1”
}

And it produces Syntax error: token epected “;”. Can anyoune help?
Please?
tnx in adwance
Andre

попробуйте так
try this
return document.childByName("Table3").sqlQuery="SELECT field1 FROM data ORDER BY \"pma_id\" ASC LIMIT 1"

Hi,
I am really greatful for response. Please have in mind that I am begginer with flipabit.
I have created button, text and table. I tried to make a button and by action CLICK select value of field1 from table and assign it to to property text of text widget.
In action window I have created Button->click ->text1->settext->script : return document.childByName("Table3").sqlQuery="SELECT field1 FROM data ORDER BY \"pma_id\" ASC LIMIT 1"

Problem is that sql is not executed but assigned to text as string. Output is value of text:
SELECT field1 FROM data ORDER BY “pma_id” ASC LIMIT 1

What went wrong?
thanks
Andre


wow… great solutions. I am really thankful for your help
You are the best!
Andre

Hi,
I have some problems with both variants. Would you be so kind and answer some questions?
With solution 1:
With current text I get value of field that I manually select. I can get also row id. But is it possible to get field ID or column id? Is it possible to programaticaly set or select a field to ger value via “current text” property?

With solution 2:
I followed your video, but I couldn’t get any data from csv file. My sql query is “SELECT Pma_id,field1 FROM data ORDER BY “pma_id” DESC LIMIT 1”
tnx
Andre


У Вас ошибки в синтаксисе

  • «pma_id»
  • Pma_id
    правильно так:
    SELECT pma_id,field1 FROM data ORDER BY pma_id DESC LIMIT 1

You have syntax errors

  • “pma_id”
  • Pma_id
    correct like this:
    SELECT pma_id,field1 FROM data ORDER BY pma_id DESC LIMIT 1
1 Like

thanks a lot. First example is working fine, but with second I still have problems. It’s really shame that such a great program like Flipabit has almost no manual, and that we bother you with very basic problems.

I have used your example to read some locations from table. I want to display them on openstreetmap. I have managed to put one marker on the map. Is it possible to show more markers on the same map? I have seen that this widget has also possibility to show route. How can I do that? Do I need to create list of points or do I need to connect csv file?
best regards
Andre


Back to Flipabit >
Copyright © 2018. Flipabit Team. All rights reserved.