Re: retrieve rows in a specified order
Date: Sun, 21 Dec 2003 17:04:24 -0000
Message-ID: <MPG.1a4fe2ca92c1b776989852_at_news1.eircom.net>
maikel7_at_poczta.onet.pl says...
> I'm starting to work with mysql (but I think my post applies to other
> databases as well) and I've come across a problem - I've read in several
> sources that the order of retrieved rows by a SELECT statement is
> undefined unless you use GROUP BY or ORDER BY. Now I need to be able to
> fetch the rows in an order defined by me or the web site's owner.
> Imagine that each row represents one product in a shop. Now I need to
> let the shop owner decide in which order the products appear on a web
> page. He needs to be able to freely change this order at any time and
> move any product to any position he wants. What would be the easiest way
> to accomplish this in a database knowing I can't change the row order?
Now, if the shop owners want to vary that ordering on the fly, you are
going to have either
relatively simple way (What development tool are you using?)
or
b) give him access to the database command line tool and allow him to put in his own values using SQL - I do *_NOT_* recommend this.
> I will be grateful for any ideas.
HTH. Paul...
> Melon.
-- plinehan x__AT__x yahoo x__DOT__x com C++ Builder 5 SP1, Interbase 6.0.1.6 IBX 5.04 W2K Pro Please do not top-post.Received on Sun Dec 21 2003 - 18:04:24 CET