2021-05-21, 08:13 AM
(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, ...);