SA-MP Forums Archive
[MYSQL-41-2] no aparecen los dialogos de registro - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: [MYSQL-41-2] no aparecen los dialogos de registro (/showthread.php?tid=625571)



[MYSQL-41-2] no aparecen los dialogos de registro - GranaT3 - 03.01.2017

Hasta ahora no me habнa animado a usar MySQL, estoy siguiendo un tutorial de un registro y login (en inglйs) pero resulta que no aparecen los dialogos o no hace la consulta.

— La base de datos si conecta
— Deberнan salir los dialogos cuando se conecta
— Usando la ъltima versiуn, actualizado Plugin e Include.

Link del registro (solo tiene 140 lineas)

їCuбles son mis fallos?

Quote:
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
Quote:
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)
Edit: no habia visto la carpeta logs xD


Re: [MYSQL-41-2] no aparecen los dialogos de registro - RIDE2DAY - 03.01.2017

EDIT: no vi la ъltima respuesta antes de comentar. Echa un vistazo al apartado inferior sobre las comillas.

En la R40 ha cambiado la forma de guardar los logs, ahora en la carpeta del servidor tienes una carpeta llamada logs. Dentro de la misma hay una carpeta llamada plugins y tres archivos que guardan los mensajes segъn la clasificaciуn: error, warning, log-core; en la carpeta deberнa encontrarse mysql.log con toda la informaciуn (debido a mysql_log).

Creo que maddinat0r lo ha puedo asн para organizar mejor los logs en caso de crear otros plugins en el futuro.

Respecto al cуdigo que dejaste yo tendrнa en cuenta lo siguiente: Todo lo demбs lo veo bien, posiblemente el error estй en la consulta debido a las comillas. O igual no tienes creada la tabla cuentas en la base de datos o algo similar.

Ya me contarбs que tal sale, Ўmucha suerte!


Respuesta: [MYSQL-41-2] no aparecen los dialogos de registro - GranaT3 - 03.01.2017

Cuando enviaste el mensaje, reciйn estaba editando el topic (no habia visto la carpeta). Realice los cambios pertinentes, pero sigue sin aparecerme los dialogos.


Quote:
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
їQuй es?, entiendo que es un error de sintaxis.


Re: [MYSQL-41-2] no aparecen los dialogos de registro - RIDE2DAY - 03.01.2017

Efectivamente, es un error de sintaxis. їPusiste las comillas correctas?
Код:
SELECT 'clave', 'id' FROM 'cuentas' WHERE 'nombre' = 'Granat3' LIMIT 1
Ahн sigo viendo las que no son, copia y pega lo siguiente:
Код:
SELECT `clave`, `id` FROM `cuentas` WHERE `nombre` = '%s' LIMIT 1
No hay razуn aparente para que no te salgan los dialogs. Te mando un MP.


Respuesta: [MYSQL-41-2] no aparecen los dialogos de registro - GranaT3 - 03.01.2017

Habia leнdo lo de las comillas, pero no note que la comillas simple que colocaste eran diferente, realmente no sй como poner ese tipo de comillas en mi teclado.

Lei algo referente a eso en sublime. Gracias.


Re: [MYSQL-41-2] no aparecen los dialogos de registro - RIDE2DAY - 03.01.2017

Ese tipo de comillas no son obligatorias, puedes omitirlas, por ejemplo:
Код:
SELECT clave, id FROM cuentas WHERE nombre = '%s' LIMIT 1
Como ves las comillas simples '' siguen siendo obligatorias para los especificadores.