MySQL column problem
#1

Hi there, i'm trying to create a new mysql code line but there are some problems about character data upload, i can't create a new collum. For now I'm using 25 collums but the code i created wont read 26th collum. One with the case lines are okay but i'cant add a new one. I'm currently using wampserver, i can open the mode there but when i want to enter the game it won't read it <<>> spawn screen won't see the data and it loops.

Код:
stock PlayerLoginLoad(playerid)
{
	new query[128];
	format(query, sizeof(query), "SELECT * FROM `users` WHERE `id` = '%d'", Users[playerid][sqlid]);
	mysql_query(query);
	mysql_store_result();
	mysql_fetch_row_format(query, "|");
	new arrCoords[128];
	new d, li;
	new aNum;
	new len;
	while(d <= strlen(query))
	{
	    if(query[d]=='|' || d==strlen(query))
		{
	        len = strmid(arrCoords, query, li, d, 128);
	        arrCoords[len] = 0;
			switch(aNum)
			{
			    case 0: Users[playerid][sqlid] = strval(arrCoords);
			    case 3: Users[playerid][posx] = strval(arrCoords);
			    case 4: Users[playerid][posy] = strval(arrCoords);
			    case 5: Users[playerid][posz] = strval(arrCoords);
			    case 6: Users[playerid][interior] = strval(arrCoords);
			    case 7: Users[playerid][vworld] = strval(arrCoords);
			    case 8: Users[playerid][level] = strval(arrCoords);
			    case 9: Users[playerid][cash] = strval(arrCoords);
			    case 10: Users[playerid][skin] = strval(arrCoords);
			    case 11: Users[playerid][hp] = strval(arrCoords);
			    case 12: Users[playerid][licenseidno] = strval(arrCoords);
			    case 13: Users[playerid][adminlevel] = strval(arrCoords);
			    case 14: Users[playerid][ban] = strval(arrCoords);
				case 15: strmid(Users[playerid][reason], arrCoords[15], 0, strlen(arrCoords[15]), 255);
				case 16: Users[playerid][chattype] = strval(arrCoords);
				case 17: Users[playerid][payday] = strval(arrCoords);
				case 18: Users[playerid][time] = strval(arrCoords);
				case 19: Users[playerid][paydaybonus] = strval(arrCoords);
				case 20: Users[playerid][exp] = strval(arrCoords);
				case 21: Users[playerid][bank] = strval(arrCoords);
				case 22: Users[playerid][bankno] = strval(arrCoords);
				case 23: Users[playerid][phonenumber] = strval(arrCoords);
			}
   			li = d+1;
      		aNum++;
      		printf("%d", strval(arrCoords));
		}
		d++;
	}
	mysql_free_result();
Reply


Messages In This Thread
MySQL column problem - by Grumbles - 04.11.2014, 12:08
Re: MySQL column problem - by Grumbles - 04.11.2014, 18:23
Re: MySQL column problem - by Vince - 04.11.2014, 18:29
Re: MySQL column problem - by Grumbles - 06.11.2014, 23:15
Re: MySQL column problem - by Grumbles - 07.11.2014, 10:55
Re: MySQL column problem - by Grumbles - 09.11.2014, 22:37
Re: MySQL column problem - by Grumbles - 10.11.2014, 15:38
Re: MySQL column problem - by Grumbles - 11.11.2014, 19:07
Re: MySQL column problem - by Grumbles - 12.11.2014, 19:34
Re: MySQL column problem - by Grumbles - 15.11.2014, 10:26

Forum Jump:


Users browsing this thread: 1 Guest(s)