MySQL - bad request

Zdravím.
Prosím vás čo je na tom request zlé?
Poradí niekto?
Senior1954

Sorrrryyyy...

Hello.
Please, what is wrong with that request?
Can anyone help?
Senior1954

What does your runQuery procedure do? PostText ?

Does id = 5 already exist ? If so you need to update not insert ?

I looked at the db via phpMyAdmin: ID = 5 is not there.....

which response content do you get in the Web.GotText event?
Have you already been successful in sending another query to the database? For example a SELECT statement?

What do you expect? What happens instead?

EDIT: I just have seen, you get a Bad Request back... does your password contain special characters? If yes, use the following runQuery procedure

Taifun

SQLKEY does not contain special characters.....

I sent a query...SELECT MAX(ID) FROM tblHost WHERE condition;
This also ended in error.....

What should be the attributes of the php script on the web server? I have 755.
It is good?

I tend to have my php files set to 664

Yes.

Try a simpler query: SELECT ID (assuming ID is a column name)

I tried: SELECT ID FROM tblCisAlkohol;
The result:
The operation list to csv table cannot accept the arguments: , ["
Fatal error: Failed opening required '/data/d/6/d6ab3409-d16d-415b-84ee-48b0b7972725/svadbamatolivka .online/sub/udaje/mojequery.php' (include_path='.:/usr/php82/lib/php') in Unknown on line 0
"]
Note: You will not see another error reported for 5 seconds.

If I put: SELECT * FROM tblCisAlcohol;
So:
The operation list to csv table cannot accept the arguments: , ["
Fatal error: Failed opening required '/data/d/6/d6ab3409-d16d-415b-84ee-48b0b7972725/svadbamatolivka .online/sub/udaje/mojequery.php' (include_path='.:/usr/php82/lib/php') in Unknown on line 0
"]
Note: You will not see another error reported for 5 seconds.

There is: SELECT * FROM tblCisAlkohol;

Looks like problems at the server end

Looks like problems at the server end
Please, do you have a tip for a free web server? To try it there...
Senior1954

Hello.
Now I have learned that the web server credentials are different. A port has also been added.
In that script before there was:
$conn = new mysqli($DB_ADDRESS,$DB_USER,$DB_PASS,$DB_NAME); //connect
Now when I fix it to:
$conn = new mysqli($DB_ADDRESS,$DB_USER,$DB_PASS,$DB_NAME,3314); //connect
So it's my fault:
Error400 Bad Reust
But this will probably be the wrong conn in .php.
Does anyone know how to fix the script?

Senior1954

You may need to use an IP address instead of a server url in your connection details

And what about the function $conn = new mysqli(...... before there were 4 parameters, now there are 5, because the admin from the web server insists on using the port. Will this not interfere?

All the parameters are optional....:wink:

This should work OK

//DATABASE DETAILS//
$DB_ADDR=""; //IP ADDRESS HERE IF NOT USING DEFAULT PORT (3306)
$DB_USER="";
$DB_PASS="";
$DB_NAME="";
$DB_PORT="";

$conn = new mysqli($DB_ADDR,$DB_USER,$DB_PASS,$DB_NAME,$DB_PORT);

A quick bit of research identified that the different port number would only work if using the IP for the server instead of the text url.