You are here: case syntax « PHP Programming Language « IT news, forums, messages
case syntax

Posted by Bob Bedford on 11/10/54 11:16

Hi,

I've no Mysql NG access from my ISP, so let me ask here.

I've a case statement in mysql.

Here is the code:

select ....,
case myvalue
when 'X' then valueX
when 'Y' then valueY
when 'A' then valueY
when 'B' then valueY

In my case, Y,A and B gave the same value.

I'm trying to do something like:

case myvalue
when 'X' then valueX
when in('Y','A','B') then valueY

But I can't get it to work with IN statement. What's the syntax ?

Bob

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация