I was wondering if you guys can help me, I've got a couple of SQL related questions.
Basically as part of a search I am currently building, I want disregard any records which contain a 0, off the top of my head I could have sworn the SQL for this is '! whatever value'. However my SQL statement is falling over at this. Any ideas?
Secondly, one table has 52 fields, labelled week1, week2, week3 etc, and the same for prices price1, price2, price3 etc. My question is how do I create a search which will iterate through each of these. At the moment my SQL statement looks something like this:
SELECT * FROM villas, pricing WHERE villas.resort = 'menorca' AND pricing.week1 = '02-01-04' WHERE price1 != '0'
Would I need to use a sub query to iterate through these prior to moving on to the next record? 😕