[Release/Guide] Account Creating With Client

07/13/2009 23:22 tanelipe#31
The code below won't work directly since it's for MSSQL (Microsoft SQ)

PHP Code:
public static bool VerifyLogin(string Username, string Password)
        {
            if (
ConnectionOpen)
            {
                
SqlCommand SQLCommand = new SqlCommand("SELECT * FROM Accounts WHERE Username='" + Username + "' AND Password='"+Password+"'", SQLConnection);
                
SqlDataReader DataReader = SQLCommand.ExecuteReader();
                return 
DataReader.HasRows;
            }
            return 
false;
        } 
Just replace those 's with `s and change the SqlCommand, SqlDataReader to whatever they're called for MySQL.