MySQL Forums
Forum List  »  Newbie

Re: 3 tables joined with where clause
Posted by: Ibram N.
Date: September 09, 2020 12:19AM

Here are the full tables descriptions. As you can see, there many other fields. My "real" query is much longer (more fields selected) but the principle is the same.

-- Table structure for table `db_Content`
--

CREATE TABLE `db_Content` (
`id` int(6) UNSIGNED NOT NULL,
`type` tinyint(3) UNSIGNED DEFAULT NULL,
`contentCode` varchar(10) DEFAULT NULL,
`contentAtomsIDC` int(6) UNSIGNED DEFAULT NULL,
`contentDatePublished` date DEFAULT NULL,
`contentPagesLengthEstimation` int(10) UNSIGNED DEFAULT NULL,
`title` varchar(255) DEFAULT NULL,
`department` tinyint(3) UNSIGNED DEFAULT NULL,
`category` tinyint(3) UNSIGNED DEFAULT NULL,
`team` tinyint(3) UNSIGNED DEFAULT NULL,
`linked` int(6) UNSIGNED DEFAULT NULL,
`description` text,
`comment` text,
`statusProgress` tinyint(3) UNSIGNED DEFAULT NULL,
`statusPercent` tinyint(3) UNSIGNED DEFAULT NULL,
`deadline` date DEFAULT NULL,
`priority` tinyint(1) UNSIGNED DEFAULT NULL,
`abandoned` tinyint(1) NOT NULL DEFAULT '0',
`workloadGBDTeam` float UNSIGNED DEFAULT NULL,
`workloadOtherDpt` float UNSIGNED DEFAULT NULL,
`locked` tinyint(1) NOT NULL DEFAULT '0',
`dateCreated` datetime DEFAULT CURRENT_TIMESTAMP,
`archived` tinyint(1) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `db_ContentTag` (
`id` int(10) UNSIGNED NOT NULL,
`content_id` int(6) UNSIGNED NOT NULL,
`tag_id` tinyint(3) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `db_Tag` (
`id` tinyint(3) UNSIGNED NOT NULL,
`tag` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`archived` tinyint(1) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


Thanks a lot,

Ibram

Options: ReplyQuote


Subject
Written By
Posted
September 03, 2020 08:39AM
September 03, 2020 10:49AM
September 04, 2020 04:18AM
Re: 3 tables joined with where clause
September 09, 2020 12:19AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.