[eluser]georgerobbo[/eluser]
Sorry. $data['rand'] selects everything from the table below (which contain the posts).
Code:
--
-- Table structure for table `post`
--
CREATE TABLE IF NOT EXISTS `post` (
`ID` int(11) NOT NULL auto_increment,
`title` varchar(25) NOT NULL,
`permalink` varchar(50) NOT NULL,
`author` varchar(25) NOT NULL,
`username` varchar(25) NOT NULL,
`date` date NOT NULL,
`time` time NOT NULL,
`filename` varchar(25) NOT NULL,
`description` varchar(200) NOT NULL,
`category` varchar(25) NOT NULL,
PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;
So to get the tags relevant to those posts I am querying the tag table with the ID of the post being displayed. To do so I need to set the ID of the post in my controller and I have done that using a foreach loop. I was wondering if there was a prettier way of doing it.