News Mod Updated [=

Started by BamBam0077, November 20, 2017, 10:37:00 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

BamBam0077

#1
original post

-- -----------------------------------------------
CREATE TABLE `news` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`memberid` int(10) unsigned NOT NULL DEFAULT '1',
`date_added` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`news_title` blob,
`content_body` blob,
`log_news` enum('yes','no') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'no',
PRIMARY KEY (`id`),
KEY `subject` (`news_title`),
KEY `body` (`content_body`),
KEY `news_date` (`date_added`),
KEY `backend_logs` (`log_news`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- -----------------------------------------------


log news is a new feature should help keep it cleaner then before.
remember to make the function inside of bittorrent.php also [= should be helpful.
SQL file supplied only due to you can program right if not ask someone else as I have a busy life, not being rude just being honest.

offical news sql:

CREATE TABLE `news` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`memberid` int(10) unsigned NOT NULL DEFAULT '1',
`date_added` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`news_title` tinyblob,
`content_body` blob,
`log_news` enum('yes','no') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'no',
PRIMARY KEY (`id`),
KEY `news_date` (`date_added`)   
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;


with backend logging

CREATE TABLE `news` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`memberid` int(10) unsigned NOT NULL DEFAULT '1',
`date_added` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`news_title` tinyblob,
`content_body` blob,
`log_news` enum('yes','no') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'no',
PRIMARY KEY (`id`),
KEY `news_date` (`date_added`),
KEY `backend_logs` (`log_news`)   
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;


some php code:

$news_subject = mysqli_query("SELECT news_title FROM news") or mysqli_error(__FILE__, __LINE__);
$news_body = mysqli_query("SELECT content_body FROM news") or mysqli_error(__FILE__, __LINE__);
"When Darkness Shadows Your Doubts, Deep Within Us Is Our Key, Not Success But Everything" ~ Anonymous