Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Howto put these two queries together?
- Benny Schudel
May 25, 2006, 9:47 pm
rate this thread
sql = "SELECT DISTINCT medium_id, COUNT(tag) AS count FROM tags WHERE
tag = 'test' GROUP BY medium_id ORDER BY count DESC"
This query is working.
Id like to try something like
sql = "SELECT * FROM media WHERE id IN (SELECT DISTINCT medium_id FROM
tags WHERE tag = 'test')"
But how can I order the resut by quantity (counts of tag)?
Thank you for help.
- » Americanas.com SALDO de TVs Com at 80% de Desconto (29798)
- — Newest thread in » MySQL Database Forum