SQL: CASE WHEN #315
Unanswered
sergey-telpuk
asked this question in
Q&A
Replies: 1 comment
-
Look at this: cycle/database#47 In your case it could be like this: $query->columns([
'a',
new Fragment('CASE WHEN a = ? THEN ? WHEN a = ? THEN ? ELSE ? END', 1, 'one', 2, 'two', 'other'),
]); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
How can I make up the following sql:
Beta Was this translation helpful? Give feedback.
All reactions