MySQL Login Help
#1

Fixed!
Reply
#2

currently learning sql(idk how to use it in pawn yet)
Quote:

// Here I want to do an if condition to see if the inputtext and mysql_fetch_field_row(savingstring1, "Password") are same, is it possible?

You can use strcmp to compare two strings
https://sampwiki.blast.hk/wiki/Strcmp
Reply
#3

Fixed!
Reply
#4

mysql_num_rows() checks if there's a row exist in the table or not. You cannot check for the password using this. First, fetch the player's password from the user's row and store it in your password's variable then check if the dialog's inputtext and the fetched password matches, using strcmp.

Small recommendation: Read some MySQL tutorials, will be more easier for you.
Reply
#5

Fixed!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)