.
I'm seeing double with this, and I just KNOW it's got to be simple -

The table "images" contains columns:
id | reference_number | image | width | height
That's all it contains, nothing else.
id is auto-increment
reference_number is usually set anew by the operator to input new data, but sometimes he returns to an earlier one to change data.
Each new reference_number will not always be higher than the previous one.
The reference_number being worked will not always be the highest in its sequence.
There are always eight images per reference_number, numbered 01 to 08, with their different widths and heights.
All types are integer.


As the operator inputs new data for the reference_number he's just newly set, or returned to, I want his monitor to display, on-the-run, all the data he's input for the reference_number he's working (even if the reference_number is newly set, he's just input image 01 and there are no images 02 to 08 yet) and order it by increasing image number.

Things like:
SELECT id, image, width, height, max(id) AS top FROM images WHERE reference_number=top ORDER BY image
one of a seeming hundred variants that I've tried, plus others with LIMIT and HAVING, just give MySQL indigestion.


(Perhaps I'm over-egging the pudding with the description, but it's helping me make sure I have it right.)

I really need a holiday...

Any thoughts? (No, not where I should go for the holiday!)

T.I.A.


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to