[thelist] sql order by sizes

Matt Warden mwarden at gmail.com
Sat Jul 7 21:11:39 CDT 2007

On 7/7/07, Brian Cummiskey <brian at hondaswap.com> wrote:
> Should i not bother with the sub query as Matt suggested, and instead
> use the power of the JS array for my sorting?

I think they were suggesting that the rendering code  (whether it be
PHP, ASP.NET, whatever) would take care of that translation. I think
their example was PHP (or similar), which is why it looked like
JavaScript, but I don't think the suggestion was that JavaScript would
do this.

In general, I do not like this idea, because the data does not stand
on its own. What does size=4 mean? I would have to look into the
application code to determine this. This is a maintenance nightmare if
you're building anything but a trivial application with zero
integration points, and it sounds like that is definitely not what
you're building.

Add to that the fact that you can avoid this completely by adding one
reference table and I really don't see the benefit.

The inner view I suggested would be my second choice. The first choice
is to normalize the data, even if you've got to use a view for your
product table to do it (due to integration dependencies).

Matt Warden
Cincinnati, OH, USA

This email proudly and graciously contributes to entropy.

More information about the thelist mailing list