MYSQL Select [Help Needed]
#1

Here is some of my code, which works.

format(query, sizeof(query), "SELECT * FROM `accounts` WHERE account_name = '%s'", pname);
mysql_query(query);
mysql_store_result();

mysql_fetch_row_format(line, "|");
sscanf(line, "p|dssdddddddffffddddddddddddddddddddddddddddddddddddddd dddsdddddddddddddddddddddffdddddddddddfddfdddddddd dddd",
PlayerInfo[playerid][account_id],
PlayerInfo[playerid][account_name],
PlayerInfo[playerid][account_password],
PlayerInfo[playerid][account_tutorial],

However, I don't need to get account_password, just everything else. How would you recommend doing that?
Reply
#2

Anyone?
Reply
#3

Just null/remove it ?
Reply
#4

Then just remove that line...
Reply
#5

Stop using wildcars
Reply
#6

Right, but if I don't use the wildcard (asterisk)... How would you tell it to select values from about 100 different rows without the line being too long for pawno?
Reply
#7

Splitting it up in an intelligent way and only using all those variables when they are really needed.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)