var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Re SQL IF statements
As my response pertains to MYSQL pls find the small correction to the previous posters post:
Sorry but this is not true, you can indeed use an '=' in a select statement
Originally Posted by
Select column1= '10' from table;
will result in a boolean interpretation of column 1 values against '10', in other words, the result set will be 0 (for a no match) or 1 (for a match).
that thread was moved to where it belonged in the first place (sql server forum)
but if you're gonna correct me again here, then i also would like to post my response --
you are correct but buddy who posted in the mysql forum is almost certainly looking for the sql server effect, to assign a column alias
it's so rare that i see someone actually using the mysql perversion, er, i mean, version which interprets the equality as a boolean expression, that it escaped my memory
of course you can do that in mysql, but you shouldn't (you should use CASE instead)
It wasnt meant to criticize but inform, the quantity and quality of reliable MySQL information is very finite and not exhaustive, any tidbit will help others as it has me.
Apologies if you felt slighted.
no apology necessary, i have a much thicker skin than that
i just wanted to make sure the message gets through to anyone else who comes upon this thread later, that using an equality in the SELECT is not a good idea, even if mysql will execute it