Getting a value from mysql

Please dont laugh....

Ive suceeded in making a listpicker and populated it from an Index number..... but how do I get any other arbitrary value and WITHOUT adding it to the listpicker, assign it to a variable or to serve as text for a label???

Yes.... I probably should be "programming" but - AGAIN - any help appreciated.


Look for the free book in

and read the chapter on Lists

Perhaps I not understanding you correctly

I have a list picker and its working fine. But that's NOT the issue. Without data going into the ListPicker, how can I extract just one field for use in a variable as text?

To pick a random item from a list, use the pick a random item block from the list drawer

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.


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

Ok, so tis pic shows the List Picker which returns the 5th field of a record-set

but the question is how do I return say the 3rd field of the same recordset without it going into the list picker?


select list item list global MunicipalitiesForListPicker
...................index 3 ?

if I understand you..... what you are suggesting will put the data associated with the index into the List Picker. Which is exactly what I don't want. I need it outside of the List Picker.

In which case you will have to iterate over the data in your main list again, extracting index 3 to a different list ?

So, If I understand you correctly, the ONLY way to return data from a database is for it to go into a List Picker or a list?

you can do what you want with the data you are getting back
also you can send another select statement to the database to select an item of your choice
you also can define a where clause, for example

select myValue FROM myTable WHERE someCondition = 1 to display it in the listpicker

and another select query

select myValue FROM myTAble WHERE id = 42 to display it outside of the listpicker, it just depends on your table, your columns and your requirements...


So, please walk me through this.

Do I need to call another php file with the query above cause that I can do. But the question remains...

you say - "to display it outside of the listpicker"

And how would I write the returned value into a variable. That is the question?


  1. select the data from the table
  2. convert it into a list
  3. use the select list item block to select an item (for example index 3) and assign it to a variable
  4. remove that item from the list using the remove list item block
  5. display the list in the listpicker