MySQL Help!
#5

before running the query check if you are still connected to the database.

Код:
CMD:test1(playerid, params[])
{
	if (mysql_ping())
	{
		new string[256];
		format(string,sizeof(string),"INSERT INTO `users` (`username`, `password`) VALUES ('%s', '%s')", GetName(playerid), params);
		mysql_query(string);

		SendClientMessage(playerid, 0xFFFFFFFF, "Connected and query success!");
	}
	else
	{
	  SendClientMessage(playerid, 0xFFFFFFFF, "You are not connected to the database!");
	}
	return 1;
}
Reply


Messages In This Thread
MySQL Help! - by NewTorran - 18.05.2010, 14:31
Re: MySQL Help! - by Steven82 - 18.05.2010, 15:10
Re: MySQL Help! - by NewTorran - 18.05.2010, 17:33
Re: MySQL Help! - by Sergei - 18.05.2010, 17:38
Re: MySQL Help! - by Anwix - 18.05.2010, 17:39
Re: MySQL Help! - by NewTorran - 18.05.2010, 18:12
Re: MySQL Help! - by Anwix - 18.05.2010, 18:38
Re: MySQL Help! - by Onyx09 - 18.05.2010, 19:18
Re: MySQL Help! - by NewTorran - 18.05.2010, 19:21
Re: MySQL Help! - by Sergei - 18.05.2010, 19:25

Forum Jump:


Users browsing this thread: 1 Guest(s)