mysql question

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hello there,

I know this isn't a mysql NG, but I've no access to any good mysql  
newsgroup, and since most php coders also know mysql, I ask here.

I've a table in wich I store pictures of articles. I've a field where I  
store the priority (let's say is the order the pictures are shown).

So I've those fields in the database: articleID, imagepath, priority.

So for article 455 I've this record:

Now some articles have missing numbers priority.
example article 24 has those records:

I've up to 5 pictures per article. How to retrieve with a query all  
articlesID where I've priority 2 but not priority1 with mysql ?

Thanks for helping  

Re: mysql question

On Thu, 09 Mar 2006 14:31:14 +0100, Bob Bedford wrote:

Quoted text here. Click to load it

SELECT articleID FROM ArticleTable GROUP BY articleID HAVING

Is that what you meant?



Andy Jeffries MBCS CITP ZCE   | gPHPEdit Lead Developer | PHP editor for Gnome 2 | Personal site and photos

Re: mysql question

Quoted text here. Click to load it

YES !!!!

Thanks Andy.  

Site Timeline