MySql database error or errors in PHP script used for MySql

I m using PHP scrip for MySQL provided by @Taifun
And currently I m facin two errors in MySQL database

Query 1

SET @row_number = 0; SELECT (@row_number:=@row_number + 1) AS num, POst FROM Posts LIMIT 5;
a. Behaviour in PHP My admin

it works fine and gives the results perfectly

b. Behaviour in app(Companion)

It shows an error 400 false

Query 2

SET @row_number = 0;
– without column headings
SELECT (@row_number:=@row_number + 1) AS num, Post ‘’ FROM Posts LIMIT 3;
I

a. Behaviour in PHP My admin

it works fine and gives the results perfectly

b. Behaviour in app(Companion)

It gives following statement
edit and not working with “without column headings statement”

My Blocks

text

text (1)

blocks (11)

blocks (14)

Edit 1

another query

The PHP scripts we use in kodular are different one from the others we use for Android studio or they are same??

Edit 2

@juananton1991 has provided three methods get,Post and web for his PHP scripts

Which are one of these has to be used and a best replica of Taifun’s script in case Taifun’s script failed to overcome these problems

Probably script does not support all functions of PhpMyAdmin.

@vknow360 Yup m thinking the same thing but then what should we do
Is there any other script available?
Or someone is able to modify it to meet these problems

You will have to find a Php expert.

1 Like

Ok thanks its a good idea
first of all i m waiting for others may be someone has already solved it or have other script to solve the problem or may be some developer can solve it
If this not happenend then i’ll create another post for PHP experts for their help

@vknow360 i have another query too
The PHP scripts we use in kodular are different one from the others we use for Android studio or they are same??

I have never made app in Android Studio so I have no idea about that.

Why to wait for others.Just do it.

1 Like

It’s same Php runs on server so there is no difference for web and app of any platform.

@ShaikhSajidAli And the methods of their use as prescribed by @Taifun are same for all scripts ?
Because php script of @juananton1991 is quite different if m not wrong i didn’t see sql key option in his script
…!!!

Taifuns script is client side query method and basic explanation of usage of sql and other one is server side query method call with api from client which is safe and don’t need sql key in client side.

@ShaikhSajidAli Yup then i think it’s gonna work but its method is completely different and i did not get its points nor these are explained in tutorial as explained by puradiva apps

edit

@juananton1991 has provided three methods get,Post and web
Which one of these has to be used and a best replica of Taifun’s script

You need php knowledge

@ShaikhSajidAli Which i m lacking at this time​:flushed: basic knowledge is enough or i have to learn it thoroughly?? Because i need only to solve this inevitable issue

Is this command, with this comment, running?
I don’t know which script you are using but you saw that there are 2 command lines, terminated by a semicolon?

Have you tried to put the line that declares the variable, inside the PHP script and send only the Select?

Yes its a command / query actually i m intailizing a variable so that i can get item one by one in a recyler view style… It is working fine with php my admin

I have no idea about this because i know nothing about PHP
If u can plz try on your side
And tell me script writing need professional level knowledge of PHP or basic knowledge is enough to understand php scripts and modify them

This need not be in the script.

Ok then which commands should be used in script and where

it is inspiring me to learn php​:joy:
My project was just near to complete after two months but then this comes inevitably… Koding thanos​:joy:

This is a variable declaration that you are using to count the number of rows that will be returned from Select. Try to put it in your script and not in the Kodular block.

Where i have to put it In php script?