I have a user images table
Code: Select all
CREATE TABLE `listing_images` (
`Id` int(10) NOT NULL auto_increment,
`fkUserId` int(10) NOT NULL,
`fkListingId` int(10) NOT NULL,
`Path` varchar(255) NOT NULL,
`isThumb` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`Id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
I tried LEFT JOIN but since there can be like 10 rows in the listing_images table for each listing then I would get each listing returned to me 10 times which is not gonna work as it has to just return each listing once.
I don't really know how to go about this so any help is appreciated