Get information from a Table Mysql
#1

Hello everyone !

It's possible to write whatever you want in a Mysql Table, and after to see that text in game by a command?

I was searched a lot, but i don't found.

I apreciate, if somebody give me an example.

I tried to make it, but i don't known if it works.
Код:
        CMD:news(playerid,params[])
	{
		new query[MAX_STRING], userstring[MAX_STRING];
		new date, title;
		format(query, sizeof(query), "SELECT * FROM News ORDER DESC");
		mysql_query(query);
		mysql_store_result();
		while(mysql_fetch_row(query))
		{
			format(userstring, sizeof(userstring), "%s \n",userstring);
		}
		mysql_free_result();
		ShowPlayerDialog(playerid,DIALOG_DEALERSHIP,DIALOG_STYLE_LIST,"News",userstring,"Read","Close");
Thankx a lot, and sorry for my bad Writing.
Reply


Messages In This Thread
Get information from a Table Mysql - by WaZP - 28.07.2015, 23:02
Re: Get information from a Table Mysql - by WaZP - 30.07.2015, 19:22
Re: Get information from a Table Mysql - by BleverCastard - 30.07.2015, 20:02
Re: Get information from a Table Mysql - by WaZP - 31.07.2015, 16:28

Forum Jump:


Users browsing this thread: 1 Guest(s)