In this piece of code AND (store_zone = $actual_zone || store_zone = 0 ) PHP: what does the || mean? I think I know what it's doing, but what's the exact explanation for it please?
|| means "or". And there should probably be 2 equal signs in each condition. This is not the complete code, but it does "something" (that we can't see in this bit) when store_zone equals $actual_zone (which we don't know what it is either), OR if it equals 0.
Thanks. I was pretty sure that was what it was. It's part of a MySQL query that I want to change, but couldn't until I knew exactly what it was. Doesn't seem to be in PHP & MySQL for Dummies. I know what the rest of the query is doing, and what the result is. Can I just use OR instead?
Yes, you can use either || or OR. (Case.insensitive) (For MySQL I'd just use OR though) Now that I know it's part of a query, the single equal signs make sense too..
Thanks again. I didn't post the rest of the query because I understood it. Although, taking stuff out of their original context can cause problems. I really need to update my PHP manual.
I never seem to be able to find out what I'm looking for. Rubbish at using the search I suppose. I like the Dummies books, but mines 4 years old now.