Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 40

Thread: Probelm with MySQL register.

  1. #11
    Private Paho's Avatar
    Join Date
    Feb 2014
    Location
    Russia
    Posts
    101
    Thanks
    43
    Thanked 48 Times in 37 Posts
    Quote Originally Posted by Benny Benassi View Post
    Every single
    Every single day - single hour
    I can see your face - single day

  2. The Following User Says Thank You to Paho For This Useful Post:

    kubislav23 (23rd July 2016)

  3. #12
    Private
    Join Date
    Jul 2016
    Posts
    21
    Thanks
    6
    Thanked 9 Times in 9 Posts
    Ur comment ain't helping here ..

  4. The Following User Says Thank You to nightbot For This Useful Post:

    kubislav23 (23rd July 2016)

  5. #13
    Private First Class YuriJurek's Avatar
    Join Date
    Jun 2013
    Posts
    219
    Thanks
    152
    Thanked 88 Times in 47 Posts
    Killtube's being taken over by nuubz...

    I had to say it xD

  6. The Following User Says Thank You to YuriJurek For This Useful Post:

    kubislav23 (23rd July 2016)

  7. #14
    Private
    Join Date
    Jul 2016
    Posts
    21
    Thanks
    6
    Thanked 9 Times in 9 Posts
    none will help then :/

  8. The Following User Says Thank You to nightbot For This Useful Post:

    kubislav23 (23rd July 2016)

  9. #15
    Private
    Join Date
    Jul 2016
    Posts
    21
    Thanks
    6
    Thanked 9 Times in 9 Posts
    @IzNoGod i managed to make the login unique and primary. But i got some problems showing errors.
    If there is an account, it returns a self thread tellmessage("account exist");
    but if there is no account, it doesn't process the query.
    I think it's from my register case.
    PHP Code:
    case "register":
                       if(
    args[2].size >= && args[2].size <= 20)
                       {
                
    haslogin searchforlogin(args[2]);
                if(
    haslogin == true)
                {
                           if(
    args[3].size >= && args[3].size <= 25)
                           {
                    return;
                }
                if(
    haslogin == false)
                {
                
    iprintlnbold("ye");            
                    
    createadmin(args[2], args[3]);
                return;
                }
                }
                    
    self thread tellmessage("Password is too short or too long. Min 5 characters, max 25.");
                               return;
                       }
                    
    self thread tellMessage("Login is too short or too long. Min 3 characters, max 20.");
                       return; 

  10. #16
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Fix your indentation.

    You'll see this:
    PHP Code:
        case "register":
            if(
    args[2].size >= && args[2].size <= 20)
            {
                
    haslogin searchforlogin(args[2]);
                if(
    haslogin == true)
                {
                    if(
    args[3].size >= && args[3].size <= 25)
                    {
                        return;
                    }
                    if(
    haslogin == false)
                    {
                        
    iprintlnbold("ye");            
                        
    createadmin(args[2], args[3]);
                        return;
                    }
                }
                
    self thread tellmessage("Password is too short or too long. Min 5 characters, max 25.");
                return;
            }
            
    self thread tellMessage("Login is too short or too long. Min 3 characters, max 20.");
            return; 
    the if(haslogin == false) is inside the if(haslogin == true)
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  11. #17
    Sergeant maxdamage99's Avatar
    Join Date
    Aug 2014
    Location
    Russia
    Posts
    458
    Thanks
    79
    Thanked 122 Times in 101 Posts
    WTF? Izno..
    PHP Code:
    if(param==true)
    {
    /*...*/
    if(param==false)
    {
    /*...*/
    }
    /*...*/

    Try:
    PHP Code:
    case "register":
    {        
        if(
    args[2].size >= && args[2].size <= 20)
        {
            if(
    args[3].size >= && args[3].size <= 25)
            {
                
    haslogin searchforlogin(args[2]);
                  if(
    haslogin)
                     
    self iprintlnbold("Login taked!");    
                  else
                     if(!
    haslogin)
                     {
                     
    self iprintlnbold("Login no register!");            
                     
    createadmin(args[2], args[3]);
                     }
            }
            else
            
    self thread tellmessage("Password is too short or too long. Min 5 characters, max 25.");
        }
        else
        
    self thread tellMessage("Login is too short or too long. Min 3 characters, max 20.");
    return;

    Last edited by maxdamage99; 24th July 2016 at 09:21.
    PHP Code:
    class CoronaVirus 
    {
       
    CoronaVirus(int m 1): multi(m) { Peoples.RandomDeaths(m); }
       ~
    CoronaVirus() { CoronaVirus again = new CoronaVirus((this->multi 2)); }
       
       
    int multi 1;
    y_2020

  12. The Following User Says Thank You to maxdamage99 For This Useful Post:

    nightbot (24th July 2016)

  13. #18
    Private
    Join Date
    Jul 2016
    Posts
    21
    Thanks
    6
    Thanked 9 Times in 9 Posts
    Thx for ur help.
    Even when the user is available i get that Login taked !

    This is my searchforlogin thread
    PHP Code:
    SearchForLogin(login)
    {
        
    maps\mp\gametypes\_mysql::asyncQuery("SELECT login FROM admins WHERE login = '" maps\mp\gametypes\_mysql::stripString(login) + "' LIMIT 1", ::checkLogin);
    }

    checkLogin(rowsargs)
    {    
       if(
    isDefined(rows) && isDefined(rows[0]) && isDefined(rows[0]["login"]) && isDefined(self))
       {

            
    self tellMessage("I'm sorry, but login " rows[0]["login"] + "^7 already exist. Choose another one.");
            return;
       }


    This is my query for creating the account:

    PHP Code:
    CreateAdmin(loginpass)
    {
        
    maps\mp\gametypes\_mysql::asyncQuery("INSERT INTO admins (login, pass) VALUES ('" maps\mp\gametypes\_mysql::stripString(login) + "', '" maps\mp\gametypes\_mysql::stripString(pass) + "')");
        
    self thread tellmessage("success");

    Maybe a problem in searchforlogin ?

  14. #19
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Quote Originally Posted by maxdamage99 View Post
    WTF? Izno..
    I replied with HIS code properly indented to show that it is wrong.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  15. #20
    Private
    Join Date
    Jul 2016
    Posts
    21
    Thanks
    6
    Thanked 9 Times in 9 Posts
    IzNoGod it would be cool if you fix it :s

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •