SELECT
tp.propID, tp.AddedDate, tp.PropType, tp.NoBedrooms, tp.ShortDesc, tp.City, tp.ReleaseDate,
ti.binaryImage
FROM dbo.tbl_Properties tp
INNER JOIN dbo.tbl_propertyImages ti On tp.propID = ti.PropID
WHERE ti.PropID IN (select Top 1 ti.binaryImage FROM dbo.tbl_PropertyImages ti WHERE tp.AddedBy = @UserID)
AND
tp.AddedBy = @UserID
|