Just off of the top of my head I would say that you would
need to convert all of your IIF statements to CASE statements, as I
don't believe that you can use IIF in MySQL. I don't use MySQL
myself, but I think that the attachment is close to using the
correct syntax. Also, I believe that MySQL has an
IF(expr1,expr2,expr3) flow control function as well, where
If expr1 is TRUE (expr1 <> 0 and expr1 <> NULL) then
IF() returns expr2; otherwise it returns expr3. IF() returns a
numeric or string value, depending on the context in which it is
used.
Phil