SA-MP Forums Archive
Help with this. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help with this. (/showthread.php?tid=630016)



Help with this. - Tirael - 07.03.2017

How can i pass this:

pawn Код:
new query[1024];
    format(query, sizeof(query),"SELECT * FROM usuarios WHERE Nombre = '%s' AND Password = md5('%s')",pNameEx(playerid), cadena);
    mysql_query(database, query, true);
    if(cache_get_row_count(database) != 0)
    {
        return 1;
    }
To mysql r7?


Re: Help with this. - GTLS - 07.03.2017

Quote:
Originally Posted by Tirael
Посмотреть сообщение
How can i pass this:

pawn Код:
new query[1024];
    format(query, sizeof(query),"SELECT * FROM usuarios WHERE Nombre = '%s' AND Password = md5('%s')",pNameEx(playerid), cadena);
    mysql_query(database, query, true);
    if(cache_get_row_count(database) != 0)
    {
        return 1;
    }
To mysql r7?
PHP код:
new query[1024],rows;
    
format(querysizeof(query),"SELECT * FROM usuarios WHERE Nombre = '%s' AND Password = md5('%s')",pNameEx(playerid), cadena);
    
mysql_query(databasequery);
     if(
cache_get_row_count(rows) != 0)
    {
        return 
1;
    } 
Assuming, database is your Global MySQL Connection Handle. Hope that helped


Respuesta: Re: Help with this. - Tirael - 07.03.2017

Quote:
Originally Posted by GTLS
Посмотреть сообщение
PHP код:
new query[1024],rows;
    
format(querysizeof(query),"SELECT * FROM usuarios WHERE Nombre = '%s' AND Password = md5('%s')",pNameEx(playerid), cadena);
    
mysql_query(databasequery);
     if(
cache_get_row_count(rows) != 0)
    {
        return 
1;
    } 
Assuming, database is your Global MySQL Connection Handle. Hope that helped
error 017: undefined symbol "cache_get_row_count"

I'm using mysql r7.


Re: Help with this. - GeorgeMcReary - 07.03.2017

Download Latest MySQL, it will fix the problem. otherwise code by GTLS is all ok.


Re: Respuesta: Re: Help with this. - GTLS - 07.03.2017

Quote:
Originally Posted by Tirael
Посмотреть сообщение
error 017: undefined symbol "cache_get_row_count"

I'm using mysql r7.
Try using,
PHP код:
 mysql_num_rows 
instead of cache_get_row_count. i think it will work for you.


Respuesta: Re: Respuesta: Re: Help with this. - Tirael - 08.03.2017

Quote:
Originally Posted by GTLS
Посмотреть сообщение
Try using,
PHP код:
 mysql_num_rows 
instead of cache_get_row_count. i think it will work for you.
In the end it was a mistake in the query but thank you.
+ Rep.