NYCPHP Meetup

NYPHP.org

[nycphp-talk] SQL question

PaulCheung paulcheung at tiscali.co.uk
Mon Jul 23 05:11:07 EDT 2007


http://www-css.fnal.gov/dsg/external/freeware/mysql-vs-pgsql.html

I came across this URL which is an additional source of general RDBMS 
information that maybe of use or interest.

Cheers

Paul
----- Original Message ----- 
From: "Steve Manes" <smanes at magpie.com>
To: "NYPHP Talk" <talk at lists.nyphp.org>
Sent: Monday, July 23, 2007 4:55 AM
Subject: Re: [nycphp-talk] SQL question


> David Krings wrote:
>> I'm getting back the rows that I want, but not in the correct order and 
>> only by using DISTINCT, which I once was told is a nono and not needed if 
>> I'd just do it right.
>> My attempt to output the columns that contain the values the reocrds are 
>> to get sorted on ends up in being a cartesian join, which barfs up 1248 
>> rows instead of the 26 I epxect.
>
> Without seeing the actual SQL query it's impossible to guess where the 
> problem is.  In general though, cartesian joins are the result of 
> incomplete join conditionals and, sometimes, overly-complex WHERE clauses 
> in cases where a left join or sub-select would be more reliable.
>
> The classic cartesian join:
>
> SELECT * FROM users, orders;
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php 



More information about the talk mailing list