Originally Posted by
01101101entor
CREATE TABLE `shoutbox` (
Tells mysql you want to create a table, and that it should be called 'shoutbox'
`id` int(11) NOT NULL auto_increment,
Tells mysql in this table (its between the bracktes) you want to create a field. The first part tells it the fild is named ID the second part is the data type, in this instance, its int or intiger and the lengh of the field is 11. The net part says the value in the table cant be null. null being nothing, in this case the start value will automaticly be 0. Auto incriment means each row gets a unqie number
`name` text NOT NULL,
Same. except its a text field, and does auto incriment
`message` longtext NOT NULL,
Same again pretty much, except longtext
`time` text NOT NULL,
yet again pretty much the same
PRIMARY KEY (`id`)
Sets primary key, as id, basicly means its ordered by it by defult
) TYPE=MyISAM;
ends sql add table code, says table type is MyISAM, although in some of the newer mysql relices InnoDB is starting to take over "/
ps. Theres no php in that, its just the sql