-1

This is my table structure

My table name siteInfo

id    | key         | value

1     | facebook    | facebook.com

2     | twitter     | twitter.com

3     | googleplus  | google.com

4     | linkedin    | linkedin.com

here how i can get facebook and googleplus values from single sql column

2
  • You've posted the same question here: stackoverflow.com/questions/23149606/… And I answered in a way that would work. Why have you asked the question again? Commented Apr 18, 2014 at 8:00
  • retrieve two rows and concate it Commented Apr 18, 2014 at 8:01

1 Answer 1

0

I think this is what you are looking for,

select group_concat(`value` separator ', ') url
from siteinfo
where `key` in ('facebook','googleplus');

here is, SQLFiddle

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.