I wanna holiday!!!

I've an asset table:
id
name
fileSize
date


and an options table:
id
name


and finally a table to match them up assetPropertyOption:
assetId
optionId


I want to pull all assets that appear in the match table, based on
what options I ask for..
I can do it for ONE option, but when I try and do more, it comes up blank..

What I reckon is each option is making a new row in the temp table,
confusuig both me and MYSQL..

But I NEED to ba able to say AND and OR alot...

HERE's my query:

=============================

SELECT asset.id, asset.naturalName, assetVersion.fileName,
assetVersion.fileNameThumb, assetVersion.dateCreated,
assetVersion.size, max(asset.assetVersionId)
FROM assetVersion

// The assets have multiple versions, so this jsut get's the latest version
INNER JOIN asset on
assetVersion.versionNumber = asset.assetVersionId AND
assetVersion.assetId = asset.id

INNER JOIN assetPropertyOption on
assetPropertyOption.assetId = asset.id and
assetPropertyOption.optionId = '2' AND
(
assetPropertyOption.optionId = '12' OR
assetPropertyOption.optionId = '8'
)

GROUP BY asset.id

================================

ideas?

____ � The WDVL Discussion List from WDVL.COM � ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
use the web interface http://e-newsletters.internet.com/discussionlists.html/
      Send Your Posts To: wdvltalk@lists.wdvl.com
To change subscription settings, add a password or view the web interface:
http://intm-dl.sparklist.com/read/?forum=wdvltalk

________________  http://www.wdvl.com  _______________________

You are currently subscribed to wdvltalk as: archive@jab.org
To unsubscribe send a blank email to [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016

Please include the email address which you have been contacted with.

Reply via email to