PDA

View Full Version : Creating tables within MySQL


barron
04-27-2006, 06:19 AM
Could anyone please inform me how I do this? I've logged into my Cpanel etc and looked at database parts but it all looks very confussing to me :(

I am following a guide to add on a mod to my forums and it says.

You will need to create a new MySQL table in your forums databse, do this by going into phpMyAdmin or any other means of creating tables and running the following query:

CREATE TABLE IF NOT EXISTS `item_cache` (
`item_name` varchar(100) NOT NULL default '',
`item_link` varchar(100) default NULL,
`item_color` varchar(20) NOT NULL default '',
`item_icon` varchar(50) NOT NULL default '',
`item_html` text NOT NULL,
UNIQUE KEY `name` (`item_name`),
FULLTEXT KEY `data` (`item_html`)
)

Anyone know how I can add this please?

punkbyth
04-28-2006, 03:01 AM
Okay, what you'll need to do is open phpmyadmin & get to the database you're installing this on.
scroll all the way down where there are two text boxes and put in the top one item_cache
in the field below put
5
For the first field in your table, the thing labeled field, below it put item_name and under Length/Values* put 100
in the second field down, for it's field name put item_link and in the Length/Values* field put 100. the next two are similar, put the names in the field, and put the lengths in that field.
then, for the next one down, put item_html in the field, and where it says varchar, click the drop down menu and change it to text.
The final two steps would be, the radio buttons toward the right, change ONLY item_name, click the radio button for it that has the U.
finally, for the item_html, in the same area, there are checkboxes. check the box for it under fulltext. That should work. :\