Перейти к содержанию
Авторизация  
#Pawno

Проблема MYSQL

Рекомендуемые сообщения

#Pawno

Вообщем вот 2 паблика которые должны загружать подъезды и квартиры. 

Но в итоге они нечего не загружают просто , в бд есть кол-во и подъездов и квартир.
 

mysql_tquery(dbHandle, "SELECT * FROM "TABLE_PD"", "LoadPd", "");
mysql_tquery(dbHandle, "SELECT * FROM `hotel`", "LoadHotel", "");
forward LoadKv();
public LoadKv()
{
	new time = GetTickCount();
	new rows, fields;
	cache_get_data(rows, fields);
	if(!rows)
	{
 		for(new idx = 1; idx <= rows; idx++)
		{
			KvInfo[idx][id] = cache_get_field_content_int(idx, "id", dbHandle); // id
			cache_get_field_content(idx, "name", KvInfo[idx][kOwner], dbHandle, MAX_PLAYER_NAME); // ip
			KvInfo[idx][kX] = cache_get_field_content_float(idx, "x", dbHandle); // kEntrx
			KvInfo[idx][kY] = cache_get_field_content_float(idx, "y", dbHandle); // kEntry
			KvInfo[idx][kZ] = cache_get_field_content_float(idx, "z", dbHandle); // kEntrz
			KvInfo[idx][kXX] = cache_get_field_content_float(idx, "xx", dbHandle); // kExitx
			KvInfo[idx][kYY] = cache_get_field_content_float(idx, "yy", dbHandle); // kExity
			KvInfo[idx][kZZ] = cache_get_field_content_float(idx, "zz", dbHandle); // hExitz
			KvInfo[idx][kInt] = cache_get_field_content_int(idx, "int", dbHandle); // carx
			KvInfo[idx][kVirt] = cache_get_field_content_int(idx, "virt", dbHandle); // cary
			KvInfo[idx][kFa] = cache_get_field_content_float(idx, "kfa", dbHandle); // carz
			KvInfo[idx][kPod] = cache_get_field_content_int(idx, "pod", dbHandle); // carfa
			KvInfo[idx][kCost] = cache_get_field_content_int(idx, "cost", dbHandle); // kExitx
			KvInfo[idx][kCarx] = cache_get_field_content_float(idx, "carx", dbHandle); // kExity
			KvInfo[idx][kCary] = cache_get_field_content_float(idx, "cary", dbHandle); // kExity
			KvInfo[idx][kCarz] = cache_get_field_content_float(idx, "carz", dbHandle); // kExitz
			KvInfo[idx][kCarfa] = cache_get_field_content_float(idx, "carfa", dbHandle); // buyprice
			KvInfo[idx][kHeal] = cache_get_field_content_int(idx, "kHeal", dbHandle); // kInt
			KvInfo[idx][kOplata] = cache_get_field_content_int(idx, "kOplata", dbHandle); //kVirtual
			KvInfo[idx][kLock] = cache_get_field_content_int(idx, "kLock", dbHandle); // kLock

			TOTALKV++;
			if(!strcmp(KvInfo[idx][kOwner],"None",true))
			{
				static const fmt_string1[] = "Квартира: %i\nСтоимость: $%i\nВойти ALT";
				new str1[sizeof(fmt_string1)+4+10];
				format(str1,sizeof(str1),fmt_string1,KvInfo[idx][id],KvInfo[idx][kCost]);
				KvLable[idx] = Create3DTextLabel(str1,0xDCEDF9FF,KvInfo[idx][kX], KvInfo[idx][kY], KvInfo[idx][kZ]+1,20.0,KvInfo[idx][kVirt],1);
			}
			else
			{
				static const fmt_string1[] = "Квартира: %i\nВладелец: %s\nВойти ALT";
				new str1[sizeof(fmt_string1)+4+MAX_PLAYER_NAME];
				format(str1,sizeof(str1),fmt_string1,KvInfo[idx][id],KvInfo[idx][kOwner]);
				KvLable[idx] = Create3DTextLabel(str1,-1,KvInfo[idx][kX], KvInfo[idx][kY], KvInfo[idx][kZ]+1,20.0,KvInfo[idx][kVirt],1);
			}
  		}
	}
	printf(" [LOAD]: Успешная загрузка 'LoadKZ' - загружено %d за %d м.с", TOTALKV,GetTickCount() - time);
	return 1;
}
forward LoadPd();
public LoadPd()
{
	new time = GetTickCount();
	new rows, fields;
	cache_get_data(rows, fields);
	if(!rows)
	{
		for(new idx = 1; idx <= rows; idx++)
		{

			pdInfo[idx][id] = cache_get_field_content_int(idx, "id", dbHandle); // id
			pdInfo[idx][pdX] = cache_get_field_content_float(idx, "x", dbHandle); // hEntrx
			pdInfo[idx][pdY] = cache_get_field_content_float(idx, "y", dbHandle); // hEntry
			pdInfo[idx][pdZ] = cache_get_field_content_float(idx, "z", dbHandle); // hEntrz
			pdInfo[idx][pdXX] = cache_get_field_content_float(idx, "xx", dbHandle); // hExitx
			pdInfo[idx][pdYY] = cache_get_field_content_float(idx, "yy", dbHandle); // hExity
			pdInfo[idx][pdZZ] = cache_get_field_content_float(idx, "zz", dbHandle); // hExitz
			pdInfo[idx][pdVirt] = cache_get_field_content_int(idx, "virt", dbHandle); // hPrice
			pdInfo[idx][pdNach] = cache_get_field_content_int(idx, "nach", dbHandle); // buyprice
			pdInfo[idx][pdKon] = cache_get_field_content_int(idx, "kon", dbHandle); // hInt
			pdInfo[idx][pdFa] = cache_get_field_content_float(idx, "fa", dbHandle); // hVirtual

			TOTALPD++;
			pdInfo[idx][pdPick][0] = CreatePickup(1318, 23, pdInfo[idx][pdX],pdInfo[idx][pdY],pdInfo[idx][pdZ]+0.35,0);
			pdInfo[idx][pdPick][1] = CreatePickup(1318, 23, 630.4156,-178.2735,997.0044,pdInfo[idx][pdVirt]);
			pdInfo[idx][pdPick][2] = CreatePickup(1239, 23, 628.1050,-168.0597,998.7397,pdInfo[idx][pdVirt]);
			static const fmt_string1[] = "Подъезд: %i\nКвартиры %i-%i";
			new str1[sizeof(fmt_string1)+5+5+5];
			format(str1,sizeof(str1),fmt_string1,pdInfo[idx][id],pdInfo[idx][pdNach],pdInfo[idx][pdKon]);
			pdLable[idx] = Create3DTextLabel(str1,0xDCEDF9FF,pdInfo[idx][pdX], pdInfo[idx][pdY], pdInfo[idx][pdZ]+1,20.0,0,1);
			pdInfo[idx][pdIcon] = CreateDynamicMapIcon(pdInfo[idx][pdX], pdInfo[idx][pdY], pdInfo[idx][pdZ], 32, -1, 0, -1, -1, 100.0);

		}
	}
	printf(" [LOAD]: Успешная загрузка 'LoadPD' - загружено %d за %d м.с", TOTALPD,GetTickCount() - time);
	return 1;
} 

[LOAD]: Успешная загрузка 'LoadKZ' - загружено 0 за 0 м.с

[LOAD]: Успешная загрузка 'LoadPD' - загружено 0 за 0 м.с



Помогите разобраться и за чего.

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты
#Pawno

закрыто

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты
Гость
Эта тема закрыта для публикации ответов.
Авторизация  

  • Последние посетители   0 пользователей онлайн

    Ни одного зарегистрированного пользователя не просматривает данную страницу

×

Важная информация

Мы разместили cookie-файлы на ваше устройство, чтобы помочь сделать этот сайт лучше. Вы можете изменить свои настройки cookie-файлов, или продолжить без изменения настроек.