I have the database setup with ID, GID, Name, Address, Shipping, etc..
Now i'm using the GROUP BY GID, so all the numbers that contain the same number are grouped together. This isn't the issue however.
The issue i'm having is some of the fields in "Shipping" aren't always going to be the same. It's either 0 for no, or 1 for yes. What I want to happen, is if any of those orders having shipped as 1, I want the entire GROUP BY to show there is an order inside of there, which contains shipping.
Question
Andrew Lyle Global Moderator
I have the database setup with ID, GID, Name, Address, Shipping, etc..
Now i'm using the GROUP BY GID, so all the numbers that contain the same number are grouped together. This isn't the issue however.
The issue i'm having is some of the fields in "Shipping" aren't always going to be the same. It's either 0 for no, or 1 for yes. What I want to happen, is if any of those orders having shipped as 1, I want the entire GROUP BY to show there is an order inside of there, which contains shipping.
I hope I made this clear enough :/
Solved it by using SUM :p
Link to comment
Share on other sites
0 answers to this question
Recommended Posts