ignore a record if = 0 not working and alternatives
Posted: Mon Oct 08, 2012 7:39 am
i have a product table and a stock table aswell as a few more. to show the item is out of stock there are two ways. i would like to know both so can decide.
one would be to just the size that has run out just not have it in the list. (this is the easier) i have the code but cant get it to work
SELECT *
FROM poochieProd, poochieCat, poochieSizes, poochieStock
WHERE poochieProd.CatID = poochieCat.CatID AND poochieProd.ProdID = poochieStock.ProdID AND poochieSizes.SizeID = poochieStock.sizeID AND poochieProd.ProdID = var1 AND poochieStock.sold !=1
then if a value of 1 is in the poochieStock.sold it will not show.
this isnt however working for me.
the other is to have the words "soldout" nest to the size that is sold out. With this option however i would need to stop the user selecting this size with either an alert say please choose another size or if they do still choose this size send the to a contact page...
any help would be greatly appreciated
one would be to just the size that has run out just not have it in the list. (this is the easier) i have the code but cant get it to work
SELECT *
FROM poochieProd, poochieCat, poochieSizes, poochieStock
WHERE poochieProd.CatID = poochieCat.CatID AND poochieProd.ProdID = poochieStock.ProdID AND poochieSizes.SizeID = poochieStock.sizeID AND poochieProd.ProdID = var1 AND poochieStock.sold !=1
then if a value of 1 is in the poochieStock.sold it will not show.
this isnt however working for me.
the other is to have the words "soldout" nest to the size that is sold out. With this option however i would need to stop the user selecting this size with either an alert say please choose another size or if they do still choose this size send the to a contact page...
any help would be greatly appreciated