Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Jan 2006
    Posts
    4

    Default syntax error

    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
    Last edited by hassnetwork; 01-17-2006 at 03:37 PM.

  2. #2
    Member
    Join Date
    Feb 2004
    Posts
    469

    Default

    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.

    Last edited by Izzee; 01-18-2006 at 09:02 AM. Reason: Fixed typo.

  3. #3
    Registered User
    Join Date
    Jan 2006
    Posts
    4

    Default

    but it will be a pain going around all 5000 members changing that

    what was the escape code you were on about

  4. #4
    Member
    Join Date
    Feb 2004
    Posts
    469

    Default

    The escape character is the back slash \ as I have shown quite clearly in the above post.

    A good explanation can be seen here:
    http://www.noviceforms.com/beginners.phtml

    and you can see its use here:
    http://www.htmlgoodies.com/beyond/ja...le.php/3470891

    Also this is a vBulletin issue and you should be addressing your questions to their forums as this is not a Cpanel/WHM problem.

    Last edited by Izzee; 01-18-2006 at 09:12 AM.

Similar Threads & Tags
Similar threads

  1. Parse error: syntax error, unexpected T_ECHO
    By crazyaboutlinux in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 04-03-2009, 04:58 AM
  2. syntax error in X theme
    By mikeyskona in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 02-05-2004, 02:06 AM
  3. Cronjobs Syntax error - need Advise
    By GuiPos in forum cPanel and WHM Discussions
    Replies: 15
    Last Post: 10-01-2003, 09:13 AM
  4. MySQL syntax error HELP!
    By MscLimp in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 09-15-2003, 02:16 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube