Originally Posted by errors.log
[14:00:07] [plugins/mysql] error #1064 while executing query "SELECT 'clave', 'id' FROM 'cuentas' WHERE nombre = 'Granat3' LIMIT 1": You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''cuentas' WHERE nombre = 'Granat3' LIMIT 1' at line 1
|
Originally Posted by mysql.log
[13:59:37] [INFO] changed log level from 'warning, error' to 'debug, info, warning, error'
[13:59:37] [DEBUG] mysql_connect("localhost", "root", "*****", "myserver", 0) [13:59:37] [DEBUG] CHandleManager::Create(this=0x29a2c8, host='localhost', user='root', pass='****', db='myserver', options=0x2963b8 ) [13:59:37] [INFO] Creating new connection handle... [13:59:37] [WARNING] mysql_connect: no password specified [13:59:37] [DEBUG] CConnection::CConnection(this=0x2a7298, host='localhost', user='root', passw='****', db='myserver', options=0x2963b8 ) [13:59:37] [DEBUG] CConnection::CConnection - new connection = 0x270a18 [13:59:37] [DEBUG] CConnection::CConnection(this=0x2f50020, host='localhost', user='root', passw='****', db='myserver', options=0x2963b8 ) [13:59:37] [DEBUG] CConnection::CConnection - new connection = 0x2abcc0 [13:59:37] [DEBUG] CThreadedConnection::WorkerFunc(this=0x2f50020, connection=0x2f50020) [13:59:37] [DEBUG] CThreadedConnection::CThreadedConnection(this=0x2f 50020, connection=0x2f50020) [13:59:37] [DEBUG] CConnectionPool::CConnectionPool(size=2, this=0x27106 ![]() [13:59:37] [DEBUG] CConnection::CConnection(this=0x30e0020, host='localhost', user='root', passw='****', db='myserver', options=0x2963b8 ) [13:59:37] [DEBUG] CConnection::CConnection - new connection = 0x2bc4f0 [13:59:37] [DEBUG] CThreadedConnection::WorkerFunc(this=0x30e0020, connection=0x30e0020) [13:59:37] [DEBUG] CThreadedConnection::CThreadedConnection(this=0x30 e0020, connection=0x30e0020) [13:59:37] [DEBUG] CConnection::CConnection(this=0x3270020, host='localhost', user='root', passw='****', db='myserver', options=0x2963b8 ) [13:59:37] [DEBUG] CConnection::CConnection - new connection = 0x2c8448 [13:59:37] [DEBUG] CThreadedConnection::WorkerFunc(this=0x3270020, connection=0x3270020) [13:59:37] [DEBUG] CThreadedConnection::CThreadedConnection(this=0x32 70020, connection=0x3270020) [13:59:37] [INFO] Connection handle with id '1' successfully created. [13:59:37] [DEBUG] CHandleManager::Create - new handle = 0x290e70 [13:59:37] [DEBUG] mysql_connect: return value: '1' [13:59:37] [DEBUG] mysql_errno(1) [13:59:37] [DEBUG] CHandle::GetErrorId(this=0x290e70) [13:59:37] [DEBUG] CConnection::GetError(this=0x2a7298, connection=0x270a1 ![]() [13:59:37] [DEBUG] CHandle::GetErrorId - return value: true, error id: '0', error msg: '' [13:59:37] [DEBUG] mysql_errno: return value: '0' [14:00:07] [DEBUG] mysql_format(1, 0x021D2720, 150, "SELECT 'clave', 'id' FROM 'cuentas' WHERE nombre = '%s' LIMIT 1") [14:00:07] [DEBUG] mysql_format: return value: '68' [14:00:07] [DEBUG] mysql_tquery(1, "SELECT 'clave', 'id' FROM 'cuentas' WHERE nombre = 'Granat3' LIMIT 1", "CheckCuenta", "i") [14:00:07] [DEBUG] CCallback::Create(amx=0x176a728, name='CheckCuenta', format='i', params=0x21d26a8, param_offset=5) [14:00:07] [DEBUG] CCallback::Create - callback index for 'CheckCuenta': 0 [14:00:07] [DEBUG] processing specifier 'i' with parameter index 0 [14:00:07] [DEBUG] retrieved and pushed value '0' [14:00:07] [INFO] Callback 'CheckCuenta' set up for delayed execution. [14:00:07] [DEBUG] created delayed callback with 1 parameter [14:00:07] [DEBUG] CHandle::Execute(this=0x290e70, type=1, query=0x2d57d0) [14:00:07] [DEBUG] CConnection::Execute(query=0x2d57d0, this=0x2f50020, connection=0x2abcc0) [14:00:07] [DEBUG] CQuery::Execute(this=0x2d57d0, connection=0x2abcc0) [14:00:07] [ERROR] error #1064 while executing query "SELECT 'clave', 'id' FROM 'cuentas' WHERE nombre = 'Granat3' LIMIT 1": You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''cuentas' WHERE nombre = 'Granat3' LIMIT 1' at line 1 [14:00:07] [DEBUG] CConnection::GetError(this=0x2f50020, connection=0x2abcc0) [14:00:07] [DEBUG] CHandle::Execute - return value: true [14:00:07] [DEBUG] mysql_tquery: return value: '1' [14:00:07] [DEBUG] CCallback::Create(amx=0x176a728, name='OnQueryError', format='dsssd) |
hostname = localhost username = root password = by_R2D database = mibasededatos auto_reconnect = true multi_statements = false pool_size = 2 server_port = 3306 ssl_enable = false
new MySQL:sql_handle;
public OnGameModeInit()
{
mysql_log(ALL);
sql_handle = mysql_connect_file("mysql.ini"); // Conexiуn mediante los datos de mysql.ini
if(sql_handle == MYSQL_INVALID_HANDLE || mysql_errno(sql_handle) != 0)
{
/*
No se pudo establecer la conexiуn.
Ojo a la condiciуn, puedes obtener MYSQL_INVALID_HANDLE y no obtener ningъn error.
*/
}
else
{
/* Conexiуn establecida correctamente. */
}
return 1;
}
new string[150];
mysql_format(db_connection, string, sizeof(string),
"SELECT 'clave', 'id' FROM 'cuentas' WHERE nombre = '%s' LIMIT 1",
nombre
);
/* Deberнa ser: */
new string[86];
mysql_format(db_connection, string, sizeof(string),
"SELECT `clave`, `id` FROM `cuentas` WHERE `nombre` = '%s' LIMIT 1",
nombre
);
Originally Posted by errors.logs
[14:23:15] [plugins/mysql] error #1064 while executing query "SELECT 'clave', 'id' FROM 'cuentas' WHERE 'nombre' = 'Granat3' LIMIT 1": You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''cuentas' WHERE 'nombre' = 'Granat3' LIMIT 1' at line 1
|
SELECT 'clave', 'id' FROM 'cuentas' WHERE 'nombre' = 'Granat3' LIMIT 1
SELECT `clave`, `id` FROM `cuentas` WHERE `nombre` = '%s' LIMIT 1
SELECT clave, id FROM cuentas WHERE nombre = '%s' LIMIT 1