query explode multiple values in one column [closed] - mysql

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
I need your help. I have 2 table.
1.company_classifications
company_name-classifications
Company A-1,2,3
Company B-1,2
2.classifications
id-name
1-Music
2-Technologi
3-Food
I need query for result like this :
company_name-classification_name
Company A-Music, Technologi, Food
Company B-Music, Food

select cc.company_name,group_concat(c.name)
from company_classifications cc
inner join classifications c
on c.id = find_in_set(c.id,cc.classifications)
group by cc.company_name;
fiddle

Related

I'm triying to find this box [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
http://postimg.org/image/oola4fxp5/
Hey my friends!
Please help me! I have to create this box for email field but i dont know what it's attiribute. How can i create this?
That is a textarea
<textarea></textarea>
See here for more information on attributes and such.

Regex to extract first two numbers of a date [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have date written like this : 01/12/2013 -- how can I display only the first two letter using REGEXP. Thanks
You could use SUBSTRING_INDEX function instead of a regexp:
SELECT SUBSTRING_INDEX(column, '/', 1)
FROM yourtable
You can also use LEFT function
SELECT LEFT(datecol,2) FROM `table`
Demo

Regular expression for multiple of 100 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
Can anybody provide me regular expression for multiple of 100.
we want to validate value in multiple of 100 .
Regards,
Pradeep
I'd use this:
^[1-9]+[0-9]*00$
First number must be from 1 to 9, then any number of random digits, and it must end in two 0's.
In future looking up a bit of regex would be a good first step, this is very very simple and can be worked out (even by a complete novice) in very little time.
what about this
([0-9]*00)|0
you can check above expression here

MySQL - Update images name in database from .jpg to .png [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I need help in updating my database,
I have a column named 'questionLink' in table 'question'
which contains names of the images, (image1.jpg, image2.jpg, image3.jpg)
there are 100s of images, and i have to remane with .png extension...
I firstly trying to show the records with this query, which is no way near to the solution.
SELECT * FROM question WHERE "questionLink" LIKE '%.jpg%'
Any help will be appriciated.
Thanks
Are you looking for something like this?
UPDATE question
SET questionLink = REPLACE(questionLink, '.jpg', '.png');
Here is SQLFiddle demo
Further reading REPLACE()

Is HTML allowed in objects description? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
This question does not appear to be about programming within the scope defined in the help center.
Improve this question
Is it possible to use HTML tags in objects description, like links? I am trying to post a link on the wall with my app but it skips HTML stuff.
With regard to your question - no. You can't use HTML tags at all when posting data to Facebook.