[Tutorial] Making a MySQL system
#41

Hey guys could anyone help me with the login problem? Register works, and it puts in a password in the MySQL database, but when i try to login it says the password is wrong. :/ Anyone?
Reply
#42

Quote:
Originally Posted by Type-R
View Post
Hey guys could anyone help me with the login problem? Register works, and it puts in a password in the MySQL database, but when i try to login it says the password is wrong. :/ Anyone?
Try it again and if your problem persists, PM me.
Reply
#43

Awesome tutorial, however before in tutorial you use sscanf to data loading . Why now don't use ?
And which one better sscanf or default plugin function?
Reply
#44

Quote:
Originally Posted by juraska
View Post
Awesome tutorial, however before in tutorial you use sscanf to data loading . Why now don't use ?
And which one better sscanf or default plugin function?
The plugin sscanf version is far better. I didn't use sscanf in this because there was hardly any variables used. If you have heaps of variables, then it's probably best to use sscanf. I didn't use it because this was simply meant to be a MySQL tutorial without adding everything else on. I was trying to show people how to do it the MySQL way.
Reply
#45

If you get "incorrect password" error every time, increase the string length in the MySQL database. The hashed password is longer than the actual password.

Just pointing that out, I had that problem.
Reply
#46

Quote:
Originally Posted by spedico
View Post
If you get "incorrect password" error every time, increase the string length in the MySQL database. The hashed password is longer than the actual password.

Just pointing that out, I had that problem.
I've increased the password length in the table by one character because the MAX_LENGTH of SHA1 is 40, I didn't count in the null character at the end.
Reply
#47

When formatting a query to update a row, why do you only have to put apostrophes( ' ) around string specifiers(%s), and not integers(%d)?
Reply
#48

Quote:
Originally Posted by VincentDunn
View Post
When formatting a query to update a row, why do you only have to put apostrophes( ' ) around string specifiers(%s), and not integers(%d)?
Because it is a string. It doesn't matter if you have a variable for it or not, strings still need the apostrophes.

e.g.
mysql_query("UPDATE Players SET Score=1337 WHERE Username='n00b' ");
Reply
#49

Awesome!

Good Job Bro!
Reply
#50

Server crashed! when player login
Reply
#51

Wow nice O_O
Reply
#52

Oracle please!
Reply
#53

Outdated. This thread should be locked.
Reply
#54

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /cnrsf/public_html/ucp1/login.php on line 44

Not sure what's going on?
Reply
#55

Download rezult?
Reply
#56

[DELETED]
Reply
#57

Honestly one of the best tutorials I have read. I am constantly using this thread to help me when I get stuck with a issue with an MySQL database.
Reply
#58

can any one teach me in easier way?
Reply
#59

Quote:
Originally Posted by naveen
View Post
can any one teach me in easier way?
Its the easiest way.. and awesome tutorial.. .
Reply
#60

I don't like the MySQL part very much (codes could be optimized), however I loved the PHP part, + for you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)