Error 1103 MySQL

Hello Koders,

I am using @Taifun method for using MySQL via PHP.

Hosting Specifications
CPU - 3 Core
RAM - 3GB
IO Limit - 5 MBPS
Entry processes (EP) - 50

What issue I am getting
Error 1103.
On home screen .initialize I call 7 different MySQL commands one by one.

Sometimes the app just works and loads fine but sometimes I see this error.

What I want to achieve
I want to know the reasons of this error, Is it due to slow network because It works sometimes so all the setup should be fine.

Some Blocks

Note - The first MySQL query runs when screen initialized followed by as seen in blocks.

Thanks In Advance!

May be, this is not fair with 7 query. If anyone query goes wrong then it will stop there itself , or query in loop mode always better with 1 or 2 or 3. Don’t attempt more than … Instead why don’t you combine all into single query and run?

How to combine all 7 in one query?

Before answering pls tell us, are you looking answers from same table or different table??

It seems you are using two tables

Users
Settings

Same Table

Try this query

SELECT username, avatar, phone, replies from Users where ID =

When you get result from this query then run another query just like this for settings table

Great, Thankyou.
I will try and Mark it as a Solution.

@Still-learning

I did some modification in query to make it work.
SELECT 'id', 'usertype', 'username', 'replies', 'avatar' FROM 'Users' WHERE 'id'="

I am getting response in - id,usertype,username,replies,avatar
u6lzdhp7JrkVRNofwx1,0,Kumar,7,https://lh3.googleusercontent.com/a/AEdFTp48qnIAsj3Eb-FOgV8WgRwVzrjIMlEzoA2w=s96-c

How can I set a label.text to the value of username and label.text2 to value of replies and so on.

I have tried a lot of methods but failed.

Do you know any simple method?

Make sure whether the format of obtained result is as csv or CSV table text then convert then into lists then use select list item list block with proper index and print them into required label

If the above result is obtained in response content then

  1. Set global variable to list from csv row text get responseContent

  2. Set name lable to select list item list-global variable index-8

  3. Set avatar picture to select list item list-global variable index-10

1 Like

I tried but

Cannot parse text argument to "list from csv row" as CSV-formatted row

blocks (1)

response format - id,usertype,username,replies,avatar
u6lzdhp7JrkVRNofwx1,0,Kumar,7,https://lh3.googleusercontent.com/a/AEdFTp48qnIAsj3Eb-FOgV8WgRwVzrjIMlEzoA2w=s96-c

in such case pls use split text at , (comma) and use the same thing

(also keep in mind,8 is no where in the list)

or try the taifun suggested method… as i am not clear with what is the format of your output

Try the list from csv table block
Taifun

@Still-learning @Taifun

I am always getting 0 on show alert.

Is there any modification that can be done on php side script to get response in .json format?

blocks(2)

PHP Script by @Taifun.

Instead of 2 try with 7

Tried but still it shows 0

Yes, because there is no cell in your response content, which contains only a 2

id,usertype,username,replies,avatar
u6lzdhp7JrkVRNofwx1,0,Kumar,7,https://lh3.googleusercontent.com/a/AEdFTp48qnIAsj3Eb-FOgV8WgRwVzrjIMlEzoA2w=s96-c

If you want to select the 2nd row, use the select list item block

Taifun

Actually, I want to select all values as I want to show in different places

Your global variable GLOBAL already contains all the data as list of lists…
If you like to remove the header row, use the remove item in list block

Taifun

Hi.
Maybe…