loop though folder names and load each one
#6

i used the plugin works but when i feed it to a mysql query it only does one

its does the mysql bit but only one file
Код:
if(strcmp(cmd, "/users", true) == 0 && IsPlayerConnected(playerid))
	{
        SendClientMessage(playerid, COLOR_GRAD3,"posting");
        new dir:dHandle = dir_open("/Users/Jonny/SA-MP/0.3e/scriptfiles/users/");
		new item[40], type;
		while(dir_list(dHandle, item, type))
		{
		    if(type == FM_FILE)
		    {
			printf("%s is a file", item);
			new szDestination[100];
			mysql_format(mysql, szDestination, "INSERT INTO users (pName) VALUES ('%s')", item);
			mysql_function_query(mysql,szDestination);
			}
		}
		dir_close(dHandle);
		return 1;
	}
Reply


Messages In This Thread
FFind help - by cssbart - 21.08.2012, 22:39
Re: loop though folder names and load each one - by CoDeZ - 21.08.2012, 23:49
Re: loop though folder names and load each one - by NinjaChicken - 22.08.2012, 00:23
Re: loop though folder names and load each one - by cssbart - 22.08.2012, 11:51
Re: loop though folder names and load each one - by Virtual1ty - 22.08.2012, 12:18
Re: loop though folder names and load each one - by cssbart - 22.08.2012, 14:17

Forum Jump:


Users browsing this thread: 1 Guest(s)