NYCPHP Meetup

NYPHP.org

[nycphp-talk] need urgent help with MySQL indexing problem

John Lacey jlacey at att.net
Wed Mar 17 14:38:13 EST 2004



Phil Powell wrote:

> John Lacey wrote:
> 
>>
>> prolly got a Cartesian product in the query... 
> 
> 
> 
> Actually, some of the queries could be producing Cartesian products, but 
> there are those that simply have this:
> 
> SELECT id, fname, lname, gpa, major, minor FROM interns ORDER BY lname, 
> date desc
> 
> For queries such as these (this is one of the queries that has on 
> occasions thrown the Fatal Error upon attempt to use mysql_query() upon 
> this statement (occurs in about 5 different scripts now).
> 

seems the query as indicated above, would not yield a CP, since 
it's only a single table... I notice you're ordering by some 
columns that are not in the requested list of fields you want 
returned... if you can duplicate it, either try eliminating the 
date and desc in the ORDER BY clause or include them in the 
SELECTED field list...

doing this may lead to some further insights...


however, have you thought of the possibility that




More information about the talk mailing list