It matters the order of the variables in mysql database? -
R3SpaWn0 - 04.08.2018
I mean.. let's say i have
PHP код:
enum plantData {
plantID,
plantExists,
plantType,
plantDrugs,
Float:plantPos[4],
plantInterior,
plantWorld,
plantObject,
Text3D:plantText3D
};
And i want to add new variable named plantOwner, i want to add it after plantID, when i save/load plants in the mysql query i have to add in order? or it doesn't matter? same in phpmyadmin, i have to create row in order? you understand me?
Resume:
Is problem if i do from this:
PHP код:
enum plantData {
plantID,
plantExists,
plantType,
plantDrugs,
Float:plantPos[4],
plantInterior,
plantWorld,
plantObject,
Text3D:plantText3D
};
PHP код:
for (new i = 0; i < rows; i ++) if (i < MAX_DRUG_PLANTS)
{
PlantData[i][plantExists] = true;
PlantData[i][plantID] = cache_get_field_int(i, "plantID");
PlantData[i][plantType] = cache_get_field_int(i, "plantType");
PlantData[i][plantDrugs] = cache_get_field_int(i, "plantDrugs");
PlantData[i][plantPos][0] = cache_get_field_float(i, "plantX");
PlantData[i][plantPos][1] = cache_get_field_float(i, "plantY");
PlantData[i][plantPos][2] = cache_get_field_float(i, "plantZ");
PlantData[i][plantPos][3] = cache_get_field_float(i, "plantA");
PlantData[i][plantInterior] = cache_get_field_int(i, "plantInterior");
PlantData[i][plantWorld] = cache_get_field_int(i, "plantWorld");
TO THIS:
PHP код:
enum plantData {
plantID,
plantOwner, //THIS
plantExists,
plantType,
plantDrugs,
Float:plantPos[4],
plantInterior,
plantWorld,
plantObject,
Text3D:plantText3D
};
PHP код:
for (new i = 0; i < rows; i ++) if (i < MAX_DRUG_PLANTS)
{
PlantData[i][plantExists] = true;
PlantData[i][plantID] = cache_get_field_int(i, "plantID");
PlantData[i][plantType] = cache_get_field_int(i, "plantType");
PlantData[i][plantDrugs] = cache_get_field_int(i, "plantDrugs");
PlantData[i][plantPos][0] = cache_get_field_float(i, "plantX");
PlantData[i][plantPos][1] = cache_get_field_float(i, "plantY");
PlantData[i][plantPos][2] = cache_get_field_float(i, "plantZ");
PlantData[i][plantPos][3] = cache_get_field_float(i, "plantA");
PlantData[i][plantInterior] = cache_get_field_int(i, "plantInterior");
PlantData[i][plantWorld] = cache_get_field_int(i, "plantWorld");
PlantData[i][plantWorld] = cache_get_field_int(i, "plantOwner"); //THIS
Re: It matters the order of the variables in mysql database? -
R3SpaWn0 - 04.08.2018
Quote:
Originally Posted by ******
Why not try it?
|
Anyways i dont know why i ask becouse i dont like to be so disorganized, i just go and make space for all to be all in his space, anyways if it works its an obsession to have te variables organized, i think
please can you help me in this post..
https://sampforum.blast.hk/showthread.php?tid=657295
i dont know how to return name from mysqlid, i want to
PHP код:
Select *character from characters where SQLID = X how to do this?