MySQL problem.
#1

Hello everyone,

So I have a problem with string loading with MySQL. Then I set my variable to string everything is ok. MySQL inserts it to table and everything looks nice. But when I need to load that string MySQL loads for me only one word, not all sentence but only one word.

On top I put variable to enum, so it looks like:
Код:
<..>
enum Item
{
        <...>
	priezastis[ 128 ], // variable.
        <...>
}
new playerDB[ MAX_PLAYERS ][ Item ];
Load Script:
Код:
forward LoadPlayer(playerid);
public LoadPlayer(playerid)
{
	new fetch[ 256 ], tmpa;
	format(query, 256, "SELECT * FROM `"TABLENAME"` WHERE id = '%i'", pInfo[playerid][pId]);
	mysql_query(query);
	mysql_store_result();
	mysql_retrieve_row();

       <...>

	mysql_fetch_field_row(fetch,"Priezastis"); // Reason
	sscanf(fetch, "s", tmpa);
	sscanf(fetch, "s[128]", playerDB[playerid][priezastis]); // variable.
       
        <...>

	mysql_free_result();
}
Reply


Messages In This Thread
MySQL problem. - by Tomejus - 28.12.2010, 07:45
Re: MySQL problem. - by armyoftwo - 28.12.2010, 08:37
Re: MySQL problem. - by Tomejus - 28.12.2010, 09:14
Re: MySQL problem. - by Tomejus - 28.12.2010, 09:23
Re: MySQL problem. - by _rAped - 30.12.2010, 02:38
Re: MySQL problem. - by Tomejus - 30.12.2010, 03:04
Re: MySQL problem. - by _rAped - 30.12.2010, 03:06
Re: MySQL problem. - by Tomejus - 02.01.2011, 00:52

Forum Jump:


Users browsing this thread: 1 Guest(s)