SA-MP Forums Archive
MYSQL Select [Help Needed] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: MYSQL Select [Help Needed] (/showthread.php?tid=147680)



MYSQL Select [Help Needed] - cAMo - 13.05.2010

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?


Re: MYSQL Select [Help Needed] - cAMo - 13.05.2010

Anyone?


Re: MYSQL Select [Help Needed] - Antonio [G-RP] - 13.05.2010

Just null/remove it ?


Re: MYSQL Select [Help Needed] - Memoryz - 13.05.2010

Then just remove that line...


Re: MYSQL Select [Help Needed] - juice.j - 13.05.2010

Stop using wildcars


Re: MYSQL Select [Help Needed] - cAMo - 14.05.2010

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?


Re: MYSQL Select [Help Needed] - juice.j - 14.05.2010

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