The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

syntax error

Discussion in 'General Discussion' started by hassnetwork, Jan 17, 2006.

  1. hassnetwork

    hassnetwork Registered

    Joined:
    Jan 15, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    hi,
    please help

    i managed to get the mysql version sorted according to the same version the previous webhost had

    i restored the db using telnet
    but on VBulletin on memberlist.php i get the error:


    Invalid SQL: SELECT uploaded, downloaded,ulspeed,dlspeed FROM users WHERE username='A'isha'
    mysql error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'isha'' at line 1

    i realised when i delete the account the error goes off but when i click on a letter like S which has a user like 'S'ad'
    because of the user having a ' in its username i believe thats causing the error

    what do you guys think?

    thanks
     
    #1 hassnetwork, Jan 17, 2006
    Last edited: Jan 17, 2006
  2. Izzee

    Izzee Well-Known Member

    Joined:
    Feb 6, 2004
    Messages:
    469
    Likes Received:
    0
    Trophy Points:
    16
    Either change the user name to remove that ' or use the escape character to fix in the script a\'isha.

    IMO obviously the best solution is to not allow username a'isha but to allow aisha.

    :)
     
    #2 Izzee, Jan 17, 2006
    Last edited: Jan 18, 2006
  3. hassnetwork

    hassnetwork Registered

    Joined:
    Jan 15, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    but it will be a pain going around all 5000 members changing that

    what was the escape code you were on about :)
     
  4. Izzee

    Izzee Well-Known Member

    Joined:
    Feb 6, 2004
    Messages:
    469
    Likes Received:
    0
    Trophy Points:
    16
    #4 Izzee, Jan 18, 2006
    Last edited: Jan 18, 2006
Loading...

Share This Page