× This category is read only

Required table structure

More
12 years 10 months ago #356 by Dirk
Required table structure was created by Dirk
Every valid table MUST have at least 3 Fields
1: Field of type INTEGER or VARSCHAR marked as PRIMARY table.
2: Title or name field type VARCHAR, TINY-, MEDIUMTEXT.
(A simple TEXT-Type field as title is not accepted, because you can not use an index on text-fields)
3: Content or description field of type TEXT or

MEDIUMTEXT
Lets take a look at the joodb_sample table:

CREATE TABLE IF NOT EXISTS 'jos_joodb_sample' (
'myid' int(1) NOT NULL AUTO_INCREMENT,
'title' varchar(100) NOT NULL,
'description' text NOT NULL,

....
PRIMARY KEY ('myid'),
KEY 'title' ('title'),
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

If you have problems take this table as pattern for your own table. And look at the main Joomla tables. They work exactly the same way even if the field names are different.
The following user(s) said Thank You: fafar

Please Log in to join the conversation.