Mysql problem
#7

Thank you very much, that functions !

Now, the problem is that when I do that, the server crash :

Код:
new query[128], data[256];
GetPlayerName(playerid, pPseudo[playerid], sizeof(pPseudo[]));
format(query,128, "SELECT * FROM members WHERE pseudo = '%s' LIMIT 1", pseudo[playerid]);
mysql_query(query), mysql_store_result();
if(mysql_num_rows())
{
    new sConnexion[128];
    mysql_fetch_field("password", pPassword[playerid]); // I have added this line
    format(sConnexion, sizeof(sConnexion), "{009FFB}Hello, {0032FB}%s !\n\n{009FFB}Please enter your password :", pPseudo[playerid]);
    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_PASSWORD, "Connexion", sConnexion, "Connexion", "Exit");
} else {
    //Register dialog here.
}
I use this plugin by StrickenKid : https://sampwiki.blast.hk/wiki/MySQL_Plugin

The parameters are : mysql_fetch_field(const fieldname[], dest[], MySQL:handle)

What is wrong in my code ?

Here is an example of code with this plugin : http://www.strickenkid.com/mysql_plugin/example.pwn

In the second /login, you can see that he do the same thing as me when the server crashed...

I don't understand :/
Reply


Messages In This Thread
Mysql problem - by Urefeu - 02.07.2012, 17:04
Respuesta: Mysql problem - by [DOG]irinel1996 - 02.07.2012, 17:13
Re: Mysql problem - by Urefeu - 02.07.2012, 18:42
Re: Mysql problem - by Urefeu - 02.07.2012, 20:28
Re: Mysql problem - by Urefeu - 03.07.2012, 14:19
Respuesta: Mysql problem - by [DOG]irinel1996 - 03.07.2012, 14:46
Re: Mysql problem - by Urefeu - 03.07.2012, 15:46
Respuesta: Mysql problem - by [DOG]irinel1996 - 03.07.2012, 16:59
Re: Mysql problem - by Urefeu - 03.07.2012, 17:02
Re: Mysql problem - by Urefeu - 03.07.2012, 17:11

Forum Jump:


Users browsing this thread: 1 Guest(s)