
Just what I wanted thanks! +repCREATE 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
So, what parts do you have to have in it, say like you were creating a forum? Also, how do you find out how long things are (like the 11 thing)?
Last edited by Hitman; 08-09-2006 at 07:12 PM.
Hm, I think I get you. You've been the biggest help, cheers!
I will leave the thread open, for anybody else who wants to help. Or explain anything.![]()
Last edited by Hitman; 09-09-2006 at 05:54 AM.
Want to hide these adverts? Register an account for free!