• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Server] MYSQL R41-4
#7
(2021-04-30, 04:59 PM)israel_Oliveira Wrote: Thanks to everyone, I had already solved the problem but I ended up not commenting here, it was a simple syntax error

There was indeed a syntax error in the logs. However:



Quote:[04/28/21 14:36:15] [INFO] Connection handle with id '1' successfully created.

A connection with id 1 was created (as literally stated in the logs). But then there's this log:

Quote:[04/28/21 11:14:16] [ERROR] mysql_format: invalid connection handle '0'

That has nothing to do with a syntax error. When you create a variable without a value, it's initial value will be 0. It is quite possible you used a wrong variable or created a new one (or the value of the variable with the MySQL connection ID was set to 0) for the connection handle:



Code:
//Global variable:

new MySQL:dbHandle;



//In your script initialisation:

dbHandle = mysql_connect(...);



//In the script that says "invalid connection handle '0'"

new MySQL:somethingElse;

mysql_format(somethingElse, ...);

//Correct: mysql_format(dbHandle, ...);
  Reply


Messages In This Thread
MYSQL R41-4 - by israel_Oliveira - 2021-04-28, 02:38 PM
RE: MYSQL R41-4 - by Chessy - 2021-04-28, 05:19 PM
RE: MYSQL R41-4 - by israel_Oliveira - 2021-04-28, 05:47 PM
RE: MYSQL R41-4 - by Chessy - 2021-04-30, 04:16 PM
RE: MYSQL R41-4 - by RhaegarX - 2021-04-30, 12:26 AM
RE: MYSQL R41-4 - by israel_Oliveira - 2021-04-30, 04:59 PM
RE: MYSQL R41-4 - by Kwarde - 2021-05-21, 08:13 AM

Forum Jump: