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='ClientN ame' 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!
"SELECT * FROM masterlist, masterupload WHERE UID=uploadID AND masterlist.client='ClientN
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What error?
ASKER
It worked after I tried your edited comment. Thanks!
ASKER
I tried your suggested query and get an error.