- 0
[Ajutor] Creare tabel in baza de date
-
Similar Content
-
baza de date
By tyur21a,
- 3 answers
- 233 views
-
- 5 replies
- 1,081 views
-
- 4 replies
- 157 views
-
- 5 replies
- 2,480 views
-
- 5 replies
- 358 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
TheRive
Vreau sa creez un tabel in baza de date pentru niste apartamente , am incercat dar nu a functionat.
Daca ma puteti ajuta.
function load_apartaments() { new x, result[32], apartaments, Cache: db = mysql_query(SQL, "SELECT * FROM `apartaments` ORDER BY `apartaments`.`ID` ASC"); for(new i, j = cache_get_row_count (); i != j; ++i) { cache_get_field_content(i, "ID", result); x = strval(result); cache_get_field_content(i, "X", result); apartamentInfo[x][apPos][0] = floatstr(result); cache_get_field_content(i, "Y", result); apartamentInfo[x][apPos][1] = floatstr(result); cache_get_field_content(i, "Z", result); apartamentInfo[x][apPos][2] = floatstr(result); cache_get_field_content(i, "Angle", result); apartamentInfo[x][apPos][3] = floatstr(result); cache_get_field_content(i, "UserID", result); apartamentInfo[x][apUser] = strval(result); cache_get_field_content(i, "Value", result); apartamentInfo[x][apValue] = strval(result); cache_get_field_content(i, "Lock", result); apartamentInfo[x][apLock] = strval(result); cache_get_field_content(i, "Owner", result); format(apartamentInfo[x][apOwner], 32, result); apartaments ++; apartamentInfo[x][apLabel] = CreateDynamic3DTextLabel("", -1, apartamentInfo[x][apPos][0], apartamentInfo[x][apPos][1], apartamentInfo[x][apPos][2], 25, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, 0, -1, -1, 100.0); refresh_label(x); } cache_delete(db); CreateDynamicMapIcon(apartamentInfo[0][apPos][0], apartamentInfo[0][apPos][1], apartamentInfo[0][apPos][2],31,0,0,0,-1,500.0); CreateDynamicMapIcon(apartamentInfo[1][apPos][0], apartamentInfo[1][apPos][1], apartamentInfo[1][apPos][2],31,0,0,0,-1,500.0); for(new i = 0; i < 24; i++) apartament_door_status[i] = 0;
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.