Freelancers Network
 
skill list top cap
Homepage
Join the Freelancer's Network
Update your details
Find a freelancer
Post a project
Find a project
Projects Archive
Post a job
Find a job
Jobs Archive
See Dan's Pages
See Andy's Pages
Link to this site
Resources
Join/Leave Forum
Forum Messages
+Additions+ Adverts
Advertising
Contact Us
Subscribe to our newsletter - enter your email address and hit return
Freelancers.net is owned and operated by Andy Stowell and Dan Winchester
skill list end cap
guru web hostcom

Find me again on Freelancers.net

Re: FN-FORUM: MySQL Query Problems

date posted 31st January 2006 15:03



>The code D wants to use to work on MySQL 3, 4 or 5 is this (subject to
>typos):
>
>SELECT ABSClients.*
>FROM `ABSClients`
>LEFT JOIN `ABSdocs_clients`
>ON ABSClients.clientID = ABSdocs_clients.clientID
>WHERE ABSdocs_clients.imageID != YOUR SEARCH CONIDION HERE
>
>A join CAN be used to eliminate results. And getting the DB engine to do it
>will probably be optimal, especially if the tables are properly indexed.
>
>
>
So *That* is what left joins are for. That will pull out all the items
from the ABSClients that do not have a corresponding member of the
ABSdocs_clients will it?

I've been using SQL for many years on many different databases but I've
only needed outer, left or right joins so infrequently that I tend to
forget what exactly they in between projects that actually need them...

I completely agree about keeping data manipulation in the Database- I do
everything I can to avoid putting too much processing into the hands of
my scripting language, when I'm using one- it's like using the edge of a
spanner to hammer nails into something, you can do it but if you have a
hammer it's probably a better tool for the job.

-ben



Messages by Day
January 31st 2006
January 30th 2006
January 29th 2006
January 28th 2006
January 27th 2006
January 26th 2006
January 25th 2006
January 24th 2006
January 23rd 2006
January 22nd 2006
January 21st 2006
January 20th 2006
January 19th 2006
January 18th 2006
January 17th 2006
January 16th 2006
January 15th 2006
January 14th 2006
January 13th 2006
January 12th 2006
January 11th 2006
January 10th 2006
January 9th 2006
January 8th 2006
January 7th 2006
January 6th 2006
January 5th 2006
January 4th 2006
January 3rd 2006
January 2nd 2006
January 1st 2006


Messages by Month
December 2006
December 2006
October 2006
October 2006
August 2006
July 2006
July 2006
May 2006
May 2006
March 2006
March 2006
January 2006


Messages by Year
2008
2007
2006
2005
2004
2003
2002
2001
2000