
chce ta baze:
CREATE TABLE `newsy` ( `id` int(5) UNSIGNED NOT NULL AUTO_INCREMENT, `ktododal` varchar(150) DEFAULT NULL, `data` int(15) DEFAULT NULL, `tresc` text, `tytul` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`), KEY `id` (`id`), KEY `date` (`data`) ) ENGINE=MyISAM; INSERT INTO `newsy` VALUES (1, 'osA', 1075189801, 'tekst newsa');
zamienic na ta baze:
CREATE TABLE `news` ( `id_news` int(11) NOT NULL AUTO_INCREMENT, `id_user` int(11) NOT NULL DEFAULT '0', `time_added` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `active` enum('y','n') NOT NULL DEFAULT 'n', `important` enum('y','n') NOT NULL DEFAULT 'y', `topic` varchar(100) NOT NULL DEFAULT '', `content` text NOT NULL, PRIMARY KEY (`id_news`) ) ENGINE=MyISAM; INSERT INTO `news` VALUES (1, 1, '2005-11-06 11:44:48', 'y', 'y', 'tytul newsa', 'tresc newsa');
wydaje mi sie ze trzeba byloby uzyc wyrazen regularnych, ale jesli chodzi o to jestem kiepski :]
jakies pomysly??