Link to home
Start Free TrialLog in
Avatar of quimmy
quimmy

asked on

MYSQL Query Help

I am attempting to write an mysql query where I pull information from 2 tables based on certain parameters. I have the following query working as I need it to:

"SELECT * FROM masterlist, masterupload WHERE UID=uploadID AND masterlist.client='ClientName' ORDER BY entry ASC"

What I need to add to this query is a condition that will return exactly what is stated above, OR all entries from masterlist where client="ClientName", without the condition that UID=uploadID as there will be cases where an entry exists in masterlist without a matching entry in masterupload. Make sense? I don't know if I need to do some type of JOIN to accomplish this, but would appreciate the help. Thanks!
ASKER CERTIFIED SOLUTION
Avatar of ste5an
ste5an
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of quimmy
quimmy

ASKER

Sorry, it should read masterlist.UID=masterupload.uploadID.

I tried your suggested query and get an error.
What error?
Avatar of quimmy

ASKER

It worked after I tried your edited comment. Thanks!