Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to edit multiple records in certain column mysql database using SQL
    primarykey
    data
    text
    <p>I have multiple records of the structure in the 'column1' column that I want to update the type in the same column.</p> <p>These fields contain information about the language, categories level and name, in only one FIELD.</p> <p>Information is separated by symbols as follows:</p> <ol> <li>" : " (two points) separating language by root( language% : Top/% )</li> <li>" / " ( Slash ) separating root ( Top / level_1) by category, and category (level_1 / level_2 ) by different level category.</li> <li>So the FIELD will have the following form "language:Top/level/level"</li> </ol> <p>Information stored on FIELDS comes from two different sources one is internal and the other FIELDS without root( Top/ ) come from an external source and must be updated by SQL</p> <p>Real example field:</p> <p><strong>before</strong></p> <p>&amp;lt;b&amp;gt;Englisch&amp;lt;/b&amp;gt;:level/Test/later</p> <p><strong>after</strong></p> <p>&amp;lt;b&amp;gt;Englisch&amp;lt;/b&amp;gt;:Top/level/Test/later</p> <p>Real example table:</p> <pre><code>**before** **after** language0:Top/level_0/name_category language0:Top/level_1/name_category language1:name_test2/name_category language1:name_test2/name_category language2:level_1/name_category language2:Top/level_1/level_2/name_category language3:level_1/level_2/name_category language3:Top/level_1/level_2/name_category language4:level_1/level_2/level_3/name_category language4:Top/level_1/level_2/level_3/name_category </code></pre> <p>first line have already changed so we need to SELECT only those record that start with "language%:level_1/%" </p> <p><strong>table_example1</strong></p> <pre><code>id **column1** 1 language0:Top/level_1/level_2/level_3/level_4 2 language1:name_test2/etc/ 3 language2:level_1/level_2/level_3/level_4 4 language3:level_1/level_2/level_3 5 language3:level_1/level_2 6 language%:level_1/ </code></pre> <p>Note: </p> <ul> <li>Only these fields must be updated in the example: line id 3,4,5,6 and only column1 in the table</li> <li>The results must be like line id 1 column1: <code>language0:Top/name_test/etc/etc/</code>.</li> <li>The field <code>language1:name_test2/etc/</code> in line id 2 column1 will be ignored is diferent format and stored diferent information.</li> <li>Basis for not changing line 2 is different link value: name_test2(name_test) LIKE 'name_test/%' only</li> <li>this # symbol not exist in the field is only to delineate you can see before column, after column</li> <li>The FIELD should be updated only if after the following two points ( : )there is exactly the expression followed by the slash (level_1/)</li> </ul> <p>Other records that start otherwise must not be modified.</p> <p>How can I do this?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload