How to delete a column from a row inside a table? (mysql)
#1

So yeah again, how to delete a column from a row inside a table INSIDE my gamemode script? I've tried something but I get this error "(error #1109) Unknown table 'pass' in MULTI DELETE" - What I tried is this:
pawn Код:
new query[300];
    format(query, sizeof (query), "DELETE `pass`, `salt` FROM `users` WHERE `id` = '%i'",
    gPlayerInfo[playerid][pPass], gPlayerInfo[playerid][pSalt], gPlayerInfo[playerid][pID]);
    mysql_function_query(gHandle, query, false, "", "", "");
Basically I want to remove pass and salt column from an user inside users table upon choosing a new password with /changepass. And after the old pass and salt has bee deleted, new pass and salt will be assigned for the player who changed his pass.

This is how it looks like inside the users table:


Thanks for help! Rep++ for helpers!
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 5 Guest(s)