Thread: sql problem
View Single Post
  #3 (permalink)  
Old 05-24-05, 05:00 AM
da.bass da.bass is offline
Newbie Coder
 
Join Date: Jul 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
OK, I found one solution, but I'm not sure if it will work in all cases:
Code:
SELECT name as a, data, version FROM content
WHERE name IN (
  SELECT contentname FROM theme
  WHERE name = 'test'
)
AND version = (
  SELECT max(version)
  FROM stylesheets
  WHERE name = a
)
Reply With Quote