25.02.2016, 15:13
Hi guys, I have a problem. See, I want to get the house's owner name by searching houseOwner's ID in 'characters' table but just couldn't do it.
Here's my code:
It always returns a null value. Where is the problem?
Here's my code:
Код:
forward evSahip(evID); // testing public evSahip(evID) { new rows, fields, sahipIsim[24]; cache_get_data(rows, fields, g_iHandle); cache_get_field_content(rows, "Character", sahipIsim, g_iHandle, sizeof(sahipIsim)); strpack(HouseData[evID][houseOwner], sahipIsim, 24 char); return 1; } stock evSahipIsim(evID) { static query[128], evSahipID; evSahipID = HouseData[evID][houseOwner]; format(query, sizeof(query), "SELECT `Character` FROM `characters` WHERE `ID` = '%d'", evSahipID); mysql_tquery(g_iHandle, query, "evSahip", "d", evID); return 1; }