SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 60 | Next

James Kennard

"Mastering Joomla! 1.5 Extension and Framework Development"

The data held in these fields is encoded as INI strings
(which we handle using the JParameter class). Before using a parameter field, we
should carefully consider the data we intend to store in the field. Data should only be
stored in a parameter field if all of the following criteria are true:
Not used for sorting records
Not used in searches
Only exists for some records
Not part of a database relationship
??? ??? ??? ???
The Database
[ 44 ]
Schema Example
Imagine we have an extension called 'My Extension' and an entity called foobar. The
name of the table is #__myextension_foobars. This schema describes the table:
Field
Datatype
NOT NULL
AUTO INC
UNSIGNED
DEFAULT
id INTEGER NULL
content TEXT
checked_out INTEGER 0
checked_out_time DATETIME 0000-00-00 00:00:00
params TEXT
ordering INTEGER 0
hits INTEGER 0
published TINYINT(1) 0
This table uses all of the common fields and uses an auto-incrementing primary key
ID field. When we come to define our own tables we must ensure that we use the
correct data types and NOT NULL, AUTO INC, UNSIGNED and DEFAULT values.


Pages:
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72