Quote:
Originally Posted by JaTochNietDan
Quote:
Originally Posted by Joe Staff
Shouldn't it be "SELECT * FROM mytable WHERE ..." ? I've made my own MySQL login system before and I think that doing "SELECT Whatever" would select a column called 'Whatever' whereas the '*' is all columns. You could also do "SELECT Username,Password FROM mytable ..." and that would get you the columns you're looking for anyway.
|
Why would you use SELECT *? He doesn't need to retrieve every single column in the entire row just for logging someone in. Also, it was an example, I don't know what columns he has.
Zafire are you using any type of encryption on the passwords?
EDIT: I just noticed this..
pawn Код:
if(!strcmp(cmdtext, "/login", true, 3)) // 3 is the length of /me
3 may be the length of /me but it's not the length of /login 
|
Hehe this was funny, I just came back and looked again on that thread and realized.
SELECT * FROM means to select everything 1 after 1, a whole row. So there's no need to that.
Eh checked your code again..
Quote:
format(query, sizeof(query),"SELECT Whatever FROM `table` WHERE Username = '%s' AND Password = '%s'", name, pass);
samp_mysql_query(query);
samp_mysql_store_result();
|
wtf?