Column mysql
#1

Where is better way to do this?

Column like this?

Code 1:

pawn Code:
mysql_get_field("vModel", szFile);
                sscanf(szFile, "p<|>ddd", vehicleInfo[extraid][0][vModel], vehicleInfo[extraid][1][vModel], vehicleInfo[extraid][2][vModel]);
Or

this?

Code 2:

pawn Code:
mysql_get_field("vModel1", szFile);
                vehicleInfo[extraid][0][vModel] = strval(szFile);

                mysql_get_field("vModel2", szFile);
                vehicleInfo[extraid][1][vModel] = strval(szFile);

                mysql_get_field("vModel3", szFile);
                vehicleInfo[extraid][2][vModel] = strval(szFile);
but is that make load the data in code 2 is much longer than code 1?

Thanks...
Reply
#2

The first one is better IMHO for the simple reasons that it's shorter and you won't need to create a shitload of columns in your DB
Reply
#3

Neither. You update your plugin and use cache_get_row_int.
Reply
#4

Quote:
Originally Posted by Vince
View Post
Neither. You update your plugin and use cache_get_row_int.
Actually if he updates his plugin it would be better to do something like the first code, using cahce_ger_row. and then using sscanf for the reasons I mentioned in my first post.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)