Új hozzászólás Aktív témák

  • Tele von Zsinór

    őstag

    válasz biker #3641 üzenetére

    phpmyadmin exportban így néznek ki (kicsit egyszerűsítettem):

    CREATE TABLE IF NOT EXISTS `tibia_news` (
    `id` int(11) NOT NULL auto_increment,
    `user_id` int(11) default NULL,
    `created_at` datetime default NULL,
    `category_id` int(11) default NULL,
    PRIMARY KEY (`id`),
    );

    INSERT INTO `tibia_news` (`id`, `user_id`, `created_at`, `category_id`)
    VALUES (1, 2, '2009-06-22 00:00:00', 1);

    a nyelvfüggő adatokat tartalmazó pedig:

    CREATE TABLE IF NOT EXISTS `tibia_news_i18n` (
    `id` int(11) NOT NULL,
    `culture` varchar(7) collate utf8_hungarian_ci NOT NULL,
    `title` varchar(255) collate utf8_hungarian_ci NOT NULL,
    `slug` varchar(255) collate utf8_hungarian_ci NOT NULL,
    `body` text collate utf8_hungarian_ci NOT NULL,
    PRIMARY KEY (`id`,`culture`)
    );

    INSERT INTO `tibia_news_i18n` (`id`, `culture`, `title`, `slug`, `body`)
    VALUES (1, 'en', 'New newsticker item', 'new_newsticker_item', 'angol tartalom');
    INSERT INTO `tibia_news_i18n` (`id`, `culture`, `title`, `slug`, `body`)
    VALUES (1, 'hu', 'Új rövidhír', 'uj_rovidhir', 'magyar tartalom');

Új hozzászólás Aktív témák