How to make a text field NULL
Posted: Tue Oct 28, 2003 11:29 pm
I guess this is really a MYSQL question, but I'll ask any how. Let me know if this is not the right place to post such a question.
Below is the code that I'm using to create a table in a MYSQL database. I'd like to set the "complete" field to have a default value of NULL.
I tried this with no luck:
I can see how to work it if the field type was varchar(), but this field is likely to have far more than 255 characters, which I think is the maximum for the varchar() type.
A second question: Could anyone explain the following line from that code snippet above:
Thanks in advance!
Below is the code that I'm using to create a table in a MYSQL database. I'd like to set the "complete" field to have a default value of NULL.
Code: Select all
$installIt = mysql_query("
CREATE TABLE $table (
id int(5) NOT NULL auto_increment,
title varchar(60) default NULL,
date varchar(10) default NULL,
full text,
complete text,
PRIMARY KEY (id),
UNIQUE KEY id (id),
FULLTEXT KEY title (title,full)
) TYPE=MyISAM;", $db);Code: Select all
complete text default NULL,A second question: Could anyone explain the following line from that code snippet above:
Code: Select all
FULLTEXT KEY title (title,full)