How to separate Rows Get by Mysql Database

Hello everyone im getting rows by filtering query SELECT * FROM Users WHERE ID = 1 After run this query im getting 2 rows but i don’t know how to separate rows 1 by 1 Anyone Know So Please Help Me…

Separate using text blocks with list blocks or in the PHP script do not return field names.

Fields names not a big issue problem is how to separate this red box rows and put in a list then show in leaderboard.

The text you get from your php script is basically a CSV table which looks like this:

hello,hi,howareyou \n hello,hi,howareyou

So you can use this block to turn this CSV table into a list of lists:


Do it would look like this:

(( hello hi howareyou ) ( hello hi howareyou ) )

Now you can use the list blocks to manipulate this list:


You can see also:
http://www.appinventor.org/bookChapters/chapter19.pdf by appinventor.org
1 Like

Outside your loop, feed a list (of course, create this list before it is empty). And maybe it will work.
list
sublist - already exists
ListView - no exist
lista - no exist
There is a loop to show the data. So, inside the first loop and outside the second try to place these blocks.
You may have to remove the parentheses “(” from the strings. Use Block Replace All.

In your script:
//echo $csv;
comment the line by placing 2 bars.

1 Like

Primary key is Number Not ID

1 Like

Im use ID like Subjects

1 = English
0 = Math

And Im filtering this rows by query and get online English subjects but after getting i don’t know how to put names. In list separate by rows

1 Like

The blocks I showed separate and show in the listview.
This block, Works.
image

1 Like

In this image have 2 rows or 2 columns i want to separate name list in separate variable and number list also in separate variable.

To place the return within the listview, it is posted above.

Use text blocks and list blocks @Mohamed_Tamer as he said.

To exclude the names of the Fields, I posted above.

1 Like

I have the same challenge.
I decided this way, one by one. UnfortunatelyEliminarParenteses

This post was flagged by the community and is temporarily hidden.

Welcome!
You tried :
1-take the response content and use the “list from cvs table text” block.
2-Then, use the block “For Each item from (length of list) to by” and pick the item, using 2 blocks “Select List Item`”:
2.1- using the first parameter index as the number of the value you want to take and the second index ( rightmost block) as the For Each “item”.

foreach2 doubleselect
listcsv

you might want to learn how to work with lists and list of lists

and if you could how us an example string you are trying to convert, then it would be much easier for us to help you…

Taifun

1 Like