SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: Why this query won't work?

  1. #1
    SitePoint Guru solidcodes's Avatar
    Join Date
    Jul 2006
    Posts
    611
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Why this query won't work?

    Hi guys

    I tried to run this sql statement below,
    Code:
    ALTER TABLE about ADD content MEDIUMTEXT(65,000);
    under PHPMyAdmin, but it show some error message.
    And the message was this,
    Code:
    #1064 - 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 '(65,000)' at line 1
    So what I have done wrong here?

    Thank you very much in advanced.
    I Love JavaScript & jQuery...

  2. #2
    Just Blow it! bronze trophy
    DaveMaxwell's Avatar
    Join Date
    Nov 1999
    Location
    Mechanicsburg, PA
    Posts
    6,683
    Mentioned
    54 Post(s)
    Tagged
    1 Thread(s)
    Shouldn't it be

    Code:
     ALTER TABLE about ADD COLUMN content MEDIUMTEXT
    Dave Maxwell - Manage Your Site Team Leader
    My favorite YouTube Video! | Star Wars, Dr Suess Style

  3. #3
    From Italy with love bronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    8,593
    Mentioned
    76 Post(s)
    Tagged
    4 Thread(s)
    Don't specify the length you want for the column:

    ALTER TABLE about ADD content MEDIUMTEXT;

    Edit: Dave beat me to it

  4. #4
    SitePoint Guru solidcodes's Avatar
    Join Date
    Jul 2006
    Posts
    611
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks guys.
    I Love JavaScript & jQuery...

Bookmarks

Posting Permissions

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