Prev | Current Page 61 | Next

James Kennard

"Mastering Joomla! 1.5 Extension and Framework Development"


The SQL displayed below will create the table described in the above schema:
CREATE TABLE '#__myextension_foobars' (
'id' INTEGER UNSIGNED NOT NULL DEFAULT NULL AUTO_INCREMENT,
'content' TEXT NOT NULL DEFAULT '',
'checked_out' INTEGER UNSIGNED NOT NULL DEFAULT 0,
'checked_out_time' DATETIME NOT NULL DEFAULT '0000-00-00
00:00:00',
'params' TEXT NOT NULL DEFAULT '',
'ordering' INTEGER UNSIGNED NOT NULL DEFAULT 0,
'hits' INTEGER UNSIGNED NOT NULL DEFAULT 0,
'published' INTEGER UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY('id')
)
CHARACTER SET 'utf8' COLLATE 'utf8_general_ci';
Date Fields
We regularly use datetime fields to record the date and time at which an action has
taken place. When we use these fields, it is important that we are aware of the effect
of time zones. All dates and times should be recorded in UTC+0 (GMT / Z).
Chapter 3
[ 45 ]
When we come to display dates and times we can use the JDate class, described in
Chapter 12. The JDate class allows us to easily parse dates, output them in different
formats, and apply UTC time-zone offsets.


Pages:
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
drukarki fiskalne kraków willa karmazyn międzyzdroje www.books61.hobbitstory.com terapia magnetyczna Informacje o hostingu