WmZilla - Webmaster and Marketplace

The Next Generation Webmaster and Trade Forum

Assistance with SQL Query

Jimp

New member

0

0%

Status

Offline

Posts

36

Likes

0

Rep

0

Bits

190

3

Months of Service

0%
Hello friends, I have a Models table, and each product in this table has 2 or 3 colors, which I store in a separate table. In other words, for a model in the Models table, there are 2 - 3 color information in the ModelGeneral table, and these colors have a status of loaded or not loaded. When sorting these models, they should not show the loaded ones based on the status of colors in the ModelGeneral table. If one of the 2 colors in a model is loaded and the other is not loaded, it should still show the product. If there are 2 rows in the ModelGeneral table for a product, with one status being 1 and the other 0, then the model should appear, but if both statuses are 1, it should not appear. I have been thinking about this for a day and still haven't been able to write the query. Can you help me with the query for the Models table and the ModelGeneral table?
 

249

6,622

6,642

Top