Re: sorting a 3d array?
- From: Jerry Stuckle <jstucklex@xxxxxxxxxxxxx>
- Date: Mon, 03 Dec 2007 07:39:28 -0500
Oliver Grätz wrote:
Jerry Stuckle schrieb:Oliver Grätz wrote:If your query is "too complicated", you can alwaysSubqueries are almost never correct. Joins are much better.
work with subqueries:
SELECT wanted_field_1,wanted_field_2
FROM (SELECT with your complicated query)
AS subtable [...]
1. This was an explicit response to "my query is too complicated" and
the whole complicated query should be encapsulated as a subquery.
I understand. And I still stand by my statement.
2. You are not stating your argument with any explanation. It reads like
"Blue is lame, red is much better."
Because SQL is not PHP, and this is a PHP newsgroup. But you can get a lot of help and explanation on how to structure your SQL statements in the appropriate newsgroup - such as comp.databases.mysql. That's where the MySQL experts hang out.
3. Subqueries are aqn important part of SQL nad the fact that they can
often be replaced by joins does not render them incorrect. There is
always more than one way to do it.
Just because they are legal doesn't mean they are correct. There are many reasons why JOINs are better.
4. Please stop full-quoting when you are in fact just anserinfg to one
sentence.
OLLi
Please learn to post SQL questions in a SQL newsgroup. This is a PHP newsgroup, in case you haven't noticed the name.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.
- Follow-Ups:
- Re: sorting a 3d array?
- From: Oliver Grätz
- Re: sorting a 3d array?
- References:
- sorting a 3d array?
- From: Ciaran
- Re: sorting a 3d array?
- From: Chuck Anderson
- Re: sorting a 3d array?
- From: Ciaran
- Re: sorting a 3d array?
- From: Oliver Grätz
- Re: sorting a 3d array?
- From: Jerry Stuckle
- Re: sorting a 3d array?
- From: Oliver Grätz
- sorting a 3d array?
- Prev by Date: Re: Get the highest result from a msql_query using php?
- Next by Date: Re: sorting a 3d array?
- Previous by thread: Re: sorting a 3d array?
- Next by thread: Re: sorting a 3d array?
- Index(es):
Relevant Pages
|