SA-MP Forums Archive
MYSQL PROBLEM - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MYSQL PROBLEM (/showthread.php?tid=612854)



MYSQL PROBLEM - kexy96 - 22.07.2016

Код:
if(response)
            {
					new string[80] ,f_name[30], count;

                    format(fData[count][fName], 30, "%s", inputtext);

					format(string, sizeof(string), "Frakciу elkйszнtve! FrakciуID:%i FrakciуNйv: %s!", fData[count][fID] , fData[count][fName]);
					SendClientMessage(playerid, -1, string);

					new query[2000];

					//mysql_format(mysql, query, sizeof(query), "INSERT INTO factions (fName) VALUES ('%e')",f_name);

					
                    
				   	fData[count][fID] 	= 	count;

				   	fData[count][fName] 	= 	f_name;
				   	
				   	format(fData[count][fRank1], 20, "Rang 1");
					format(fData[count][fRank2], 20, "Rang 2");
					format(fData[count][fRank3], 20, "Rang 3");
					format(fData[count][fRank4], 20, "Rang 4");
					format(fData[count][fRank5], 20, "Rang 5");
					format(fData[count][fRank6], 20, "Rang 6");
					format(fData[count][fRank7], 20, "Rang 7");
					format(fData[count][fRank8], 20, "Rang 8 - Leader");
					
					mysql_format(mysql, query, sizeof(query), "INSERT INTO `factions` (fID, fName, fRank1, fRank2, fRank3, fRank4, fRank5, fRank6, fRank7, fRank8) VALUES (%i,'%s','%s','%s','%s','%s','%s','%s','%s','%s')",
						fData[count][fID], fData[count][fName],
						fData[count][fRank1],fData[count][fRank2],
						fData[count][fRank3],fData[count][fRank4],
						fData[count][fRank5],fData[count][fRank6],
						fData[count][fRank7],fData[count][fRank1]);
						
                    mysql_tquery(mysql, query);

					count ++;

            }
I create a new faction and mysql fName empty and fRank1,fRank2 etc.. NULL... WHY?