Strings II - Manipulate Many Criteria


Hi All,

What if I want to clean the ingredients column?

REPLACE(ingredients,'enriched_',' ') as item_ingredients,
replace(ingredients,'_',' ') as item_ingredients


Tried this, but the result is 2 columns.

How to combine it into 1 column?
Or to manipulate many criteria of strings in a column?

Thank you in advance.


Maybe this helps
Step 8/9: Replace enriched_flour with just flour

SELECT id, REPLACE(REPLACE(ingredients,'enriched_flour','flour'),'_',' ') as item_ingredients
from baked_goods;

Hi Leon, thank you for the link.
This one works, so is this the same concept with inner join?


I do not understand the question
may this will help
P. 4 - Combine the albums and tracks tables using an INNER JOIN. Order the query by album_id
=for the near future=
PHP: 'While' loop skipping 'echo' when 'if' statement returns false


Hi Leon, I mean to make all the underscore disappear and at the same time making other changes like enriched flour into flour, etc.

It’s ok, I grasp the concept now. Thank you. :slight_smile:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.