Skip navigation links

MySQL Forums :: PHP :: Complex search - multiple fields and tables - need advice.


Advanced Search

Re: Complex search - multiple fields and tables - need advice.
Posted by: laptop alias ()
Date: April 18, 2012 05:05AM

With the exception of employee locations (which, by virtue of being itself an OUTER JOIN, has no relevancy at all to the query) all your tables are joined using OUTER JOINs with WHERE conditions attached. This effectively makes them INNER JOINs. Is this what you want?

Also I don't understand this line:

($date_field BETWEEN '$date_from' AND '$date_to')

Finally, well done for providing CREATE TABLE statements. However, to help with performance issues we usually need to see the EXPLAIN for the relevant query as well:

Please provide the result of EXPLAIN SELECT...



Edited 2 time(s). Last edit at 04/18/2012 05:18AM by laptop alias.

Options: ReplyQuote


Subject Written By Posted
Complex search - multiple fields and tables - need advice. Luke Pittman 04/17/2012 04:49PM
Re: Complex search - multiple fields and tables - need advice. laptop alias 04/18/2012 05:05AM
Re: Complex search - multiple fields and tables - need advice. Luke Pittman 04/18/2012 10:31AM
Re: Complex search - multiple fields and tables - need advice. Luke Pittman 04/18/2012 11:19AM
Re: Complex search - multiple fields and tables - need advice. Luke Pittman 04/18/2012 11:24AM
Re: Complex search - multiple fields and tables - need advice. laptop alias 04/18/2012 05:32PM
Re: Complex search - multiple fields and tables - need advice. Luke Pittman 04/19/2012 12:43PM
Re: Complex search - multiple fields and tables - need advice. laptop alias 04/19/2012 01:11PM
Re: Complex search - multiple fields and tables - need advice. Luke Pittman 04/19/2012 01:15PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.