Assigning Items from a Mysql query to variables

but my blocks look like this???

ok, I got it

Set this
image

to a label, then run your app, screen shot the output

It reads the same as what I got in the browser////

In which case it should just work with the list to csv table (or row) block, and no need to use any of the blocks I made earlier

so which do I cut out

the SPLIT AT SPACE , REPLACE ALL TEXT WITH??

Just feed the [global RTN_VAL] into the initialize local SQLList to <- HERE??

Is this right?

I get the feeling that you have led us on a merry dance here.

If the responseContent contains a comma separated list, then the output you were showing us previously - ((a b c d )) was after the conversion to a list of lists using the list from csv table block. You are actually getting back a csv row - a,b,c,d.

Use the list from csv row block to create SQLList

Im getting back square brackets and “” in the string???

No, like the previous one without all the text blocks, and using list from csv row instead of list from csv table

Can anyone tell me WHO is stripping out all my commas? I need them!


This data should fill 4 variables but it’s all packed into one because - NO COMMAS

Once I’ve solved that, I should be good to go!

Thanks

Friend, you already made another topic where you did not know how to clarify your problem. Reread the responses to the other topic.

Nut it did not allow me to post anything… It just woulldnt allow me to edit or to add anything???

Sorry

The other responses didnt seem to work.

but I am so close now… Its encouraging. If Only!

You are getting 18 fields back in your query, but you only appear to have 8 labels to put it all in…this is why you get the length of list error.

Might be easier to set the list to a listview…

TimAi2, do youi mean this…???

No I added it yesterday when I added extra fileds to the database, the php and to Kodular.

The issue NOW isn’t the length of list. It that the commas are being stripped out and I need them to differentiate the variables to place them in the correct fields

A list view, wont allow me to incorporate a switch (or will it)? I couldnt see how

A listview will allow you to make a selection and take an action based upon that selection, or any selection. Not sure what you mean by a switch for a label ?

Im using your Alarm block. So I’m writing a value into the label of the Alarm and I want to put a description under each.

image

It is not my Alarm block…I see that a listview will not work easily in this setup

no, it wont. but surely its just a case of finding out what is destroying the comas so that the returned items find their way to the correct (sequential) variable.

because as you know, we stripped out the () but the commas seem to have gone aswell.

So Im thinking just to hard-code it and to take each item in the returned string by index and manually assign it to the variable. (there are only 18 of them to do) - BUT I STILL NEED THE COMMAS :frowning:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.