#1
  1. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2001
    Location
    Finland
    Posts
    716
    Rep Power
    51

    (MySQL) creating table , VARCHAR (<<unlimited>>)


    I'm creating a guestbook, and the messages will be saved in a database. But as I don't know how long the visitors message will be so I can't set a limit for VARCHAR. I'd like to have it as unlimited, how do I set it?

    mysql_query ("create table news(date VARCHAR(20), sender VARCHAR(100), topic VARCHAR(50), msg VARCHAR(unlimited)") or die("err... wont work");
    Last edited by Kimppa; August 2nd, 2002 at 12:29 PM.
    Fatal error on row 561: Couldn't access life - life isn't set
  2. #2
  3. Wiking
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Sep 2000
    Location
    Sweden
    Posts
    3,608
    Rep Power
    27
    FYI - This belongs in the mysql forum...
    The 'unlimited VARCHAR' type in MySQL is a TEXT column, and there are also different kinds of those available. For more info, see the manual.

    //NoXcuz
    UN*X is sexy!
    who | grep -i blonde | date; cd ~; unzip; touch; strip; finger; mount; gasp; yes; uptime; umount; sleep
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2001
    Location
    Finland
    Posts
    716
    Rep Power
    51
    Ok, thank you.

    Sorry for posting it on the wrong section, honestly I tried to look for a MySQL section but didn't see it. Heheh, see it now
    Fatal error on row 561: Couldn't access life - life isn't set

IMN logo majestic logo threadwatch logo seochat tools logo