August 2nd, 2002, 12:25 PM
-
(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
August 2nd, 2002, 01:08 PM
-
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
August 2nd, 2002, 01:14 PM
-
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