phpMyAdmin, search / replace

SQL question.  I need to change the category on about 100 recordings in a database record 600.   So I need to refine the query.  Before you do something stupid, I was wondering if anyone has experience with this.   I don't do global changes to databases too often.   It looks all right?

UPDATE 'table_name' WHERE 'prodcode' LIKE '% abc %' AND 'category' = '% old_string %' SET 'category' = REPLACE (cateogory, 'old_string', "new_string")

Nancy O.

You cannot use wildcard characters % =. Or the table and column names are in quotes. In addition, the WHERE clause comes at the end make sure there is no space between the opening parenthesis and REPLACE it.

It should be this:

UPDATE table_name SET category = REPLACE(category,'old_string','new_string') WHERE prodcode LIKE '% abc %' category AND LIKE '% old_string % '.

To make sure that you do not accidentally change false values, go to the operations tab in phpMyAdmin and made first a copy of the table. In a recent version of phpMyAdmin you can also use the button simulate the query in the SQL tab to test the number of lines would be affected by an UPDATE or DELETE query.

Tags: Dreamweaver

Similar Questions

  • Dreamweaver search / replacement of marked text no longer work

    Dreamweaver search / replacement of marked text no longer work

    When I mark a block of text and begin to replace a single string for example, DW replace only the first is the string a judgment of exploitation

    Try to update your version of DW Adobe - Dreamweaver Support Center: Updaters

  • Search & replace history in illustrator

    How to maintain search & replace history, when I quit illustrator and open search & replace history disappears

    Screen Shot 2016-05-20 at 2.33.43 PM.pngScreen Shot 2016-05-20 at 2.33.54 PM.png

    @

    But you could add 'save queries to search/replace' in the feature request form, and maybe we'll get it in a future version. Feature request/Bug Report Form

  • How the process of searching / replacing text within brackets ([])

    Hello

    How the process of searching / replacing text within brackets ([]).

    I want to make the process so that the replacement inside text: ([]) this particular color and style of a particular paragraph.

    You try this option: (-[]) ([*. * \w*\d*)(\])

    Unfortunately, the process was not successfully that entirely, it does not determine if there is more than one paragraph.

    File test installation with photos.

    Sorry for mistakes in writing, I don't know English well.

    PDF + INDD

    http://www.up-00.com/?ggcf

    http://www.up-00.com/?QBcf


    Fonts:

    http://www.up-00.com/?ABcf

    Test_3.png

    Test_2.png

    Test_1.png

    Relevant if no Notes: (?s)\[.+?\]

    If not, this regular expression could play the game:   (?s)\[(~F?. *?) +\]

  • How rename (search/replace) par UN script styles sheets

    How rename (search/replace) the sheets of styles, par UN script?

    In order to remove all the "exotic" characters

    I think you chose the wrong forum. This forum, EST pour Acrobat JavaScript only.

  • Search & replace confirmation

    I installed SQL Developer 4.0.0.13 and I'm not really fond of the new confirmation box search / replace.  Around the screen, it jumps to the next occurrence of the text being constantly have to hunt the box around the confirmation screen.  I'd rather have the features like pre - 4.0 versions that keep the box of confirmation in one place while stressing again the next shot.

    Is - this configurable?  I don't see this in the preferences.

    Thank you.

    No hunting around not required, just use the shortcut keys Alt + Y, Alt + N, Alt + A

  • How can I make a long list of search - replace only the master

    Hello world

    I had this script:

    //---------------------------------------------------------------------------------------- -------------------------------

    myDocuments var = app.documents.everyItem ();
    var myLayers = myDocuments.layers.everyItem ();

    Locked text on master blocks spreads are not affected.
    If you want to unblock, please add something like this:

    Unlock all elements of each document page on is spreading and Captain spreads (optional):
    myDocuments.pageItems.everyItem (.locked = false);

    var myPageItemsOnNormalSpreads = myDocuments.spreads.everyItem ().pageItems.everyItem ();

    Unlock the layers (optional)
    myLayers.locked = false;

    Lock all elements of page level first on normal spreads
    This leaves the elements on the page on unlocked master spreads:
    myPageItemsOnNormalSpreads.locked = true;

    Now for the GREP part:
    app.findChangeGrepOptions.includeMasterPages = true;
    app.findGrepPreferences = changeGrepPreferences = null;
    app.findGrepPreferences.findWhat = "\\b20\\d+\\b";

    Research on "all open document" level
    Which returns an array of arrays:
    var myTarget = myDocuments.findGrep ();

    Flattening of myTarget Bay:
    var flattenedFoundArray = [];

    for (var n = 0; n < myTarget.length; n ++) {}
    flattenedFoundArray = flattenedFoundArray.concat (myTarget [n]);
    };

    Change the content of the texts found in flat table:
    for (var n = flattenedFoundArray.length - 1; n > = 0; n-) {}
    flattenedFoundArray [n] .silence = String (Number(flattenedFoundArray[n].contents) + 1);
    };

    Unlock all objects on normal spreads:
    myPageItemsOnNormalSpreads.locked = false;

    Reset search GREP and edit the prefs:
    app.findGrepPreferences = changeGrepPreferences = null;

    //---------------------------------------------------------------------------------------- -------------------------------

    made by Uwe

    I change in this, to make a multi elements of search - replace only the master

    //==============================================================================

    myDocuments var = app.documents.everyItem ();
    var myLayers = myDocuments.layers.everyItem ();

    Locked text spreads masters frameworks are not affected.
    If you want to unblock, please add something like this:

    Unlock all items page of each document of spreads and master spreads (optional):
    myDocuments.pageItems.everyItem (.locked = false);

    var myPageItemsOnNormalSpreads = myDocuments.spreads.everyItem ().pageItems.everyItem ();

    Unlock the layers (optional)
    myLayers.locked = false;

    Lock all elements of page level first on normal spreads
    This leaves the elements on the page on unlocked master spreads:
    myPageItemsOnNormalSpreads.locked = true;

    Now for the GREP part:
    app.findChangeGrepOptions.includeMasterPages = true;
    app.findGrepPreferences = changeGrepPreferences = null;
    app.findGrepPreferences.findWhat = "USA";

    Research on "all open document" level
    Which returns an array of arrays:
    var myTarget = myDocuments.findGrep ();

    Flattening of myTarget Bay:
    var flattenedFoundArray = [];

    for (var n = 0; n < myTarget.length; n ++) {}
    flattenedFoundArray = flattenedFoundArray.concat (myTarget [n]);
    };

    Change the content of the texts found in flat table:
    for (var n = flattenedFoundArray.length - 1; n > = 0; n-) {}
    flattenedFoundArray [n] .silence = "CHINA";
    };

    Unlock all objects on normal spreads:
    myPageItemsOnNormalSpreads.locked = false;

    Reset search GREP and edit the prefs:
    app.findGrepPreferences = changeGrepPreferences = null;


    //---------------------------------------------------------------------------------------- -------------------------------

    myDocuments var = app.documents.everyItem ();
    var myLayers = myDocuments.layers.everyItem ();

    Locked text spreads masters frameworks are not affected.
    If you want to unblock, please add something like this:

    Unlock all items page of each document of spreads and master spreads (optional):
    myDocuments.pageItems.everyItem (.locked = false);

    var myPageItemsOnNormalSpreads = myDocuments.spreads.everyItem ().pageItems.everyItem ();

    Unlock the layers (optional)
    myLayers.locked = false;

    Lock all elements of page level first on normal spreads
    This leaves the elements on the page on unlocked master spreads:
    myPageItemsOnNormalSpreads.locked = true;

    Now for the GREP part:
    app.findChangeGrepOptions.includeMasterPages = true;
    app.findGrepPreferences = changeGrepPreferences = null;
    app.findGrepPreferences.findWhat = 'Washington DC';

    Research on "all open document" level
    Which returns an array of arrays:
    var myTarget = myDocuments.findGrep ();

    Flattening of myTarget Bay:
    var flattenedFoundArray = [];

    for (var n = 0; n < myTarget.length; n ++) {}
    flattenedFoundArray = flattenedFoundArray.concat (myTarget [n]);
    };

    Change the content of the texts found in flat table:
    for (var n = flattenedFoundArray.length - 1; n > = 0; n-) {}
    flattenedFoundArray [n] .silence = "Beijing."
    };

    Unlock all objects on normal spreads:
    myPageItemsOnNormalSpreads.locked = false;

    Reset search GREP and edit the prefs:
    app.findGrepPreferences = changeGrepPreferences = null;


    //===============================================================================

    only what I can do is to repeat and repeat again

    is this another perfect solution to do?

    Thank you

    Teetan

    Try this,

    findChange("USA", "CHINA");
    findChange("Washington DC", "Beijing");
    
    function findChange (findWhat, changeContent){
        var myDocuments = app.documents.everyItem();
        var myLayers = myDocuments.layers.everyItem();
        //Locked text frames on master spreads are not touched.
        //If you want to unlock them you have to add something like this:
        //Unlock ALL page items in every document on spreads and master spreads (optional):
        myDocuments.pageItems.everyItem().locked = false;
        var myPageItemsOnNormalSpreads = myDocuments.spreads.everyItem().pageItems.everyItem();
        //Unlock the layers (optional)
        myLayers.locked = false;
        //Lock all first level page items on normal spreads
        //That leaves the page items on master spreads unlocked:
        myPageItemsOnNormalSpreads.locked = true;
        //Now for the GREP part:
        app.findChangeGrepOptions.includeMasterPages = true;
        app.findGrepPreferences = changeGrepPreferences = null;
        if(findWhat)app.findGrepPreferences.findWhat = findWhat;
        //Do the search on "all open document" level
        //That will return an array of arrays:
        var myTarget = myDocuments.findGrep();
        //Flattening the myTarget array:
        var flattenedFoundArray = [];
        for(var n=0;n=0;n--){
            if(changeContent)flattenedFoundArray[n].contents = changeContent;
            };
        //Unlock all objects on normal spreads:
        myPageItemsOnNormalSpreads.locked = false;
        //Reset GREP find and change prefs:
        app.findGrepPreferences = changeGrepPreferences = null;
    }
    

    Vandy

  • How can I search - replace in master pages only?

    Hello world

    How can I search - replace in master pages only?

    for example:

    I want to change in 2013-2014, but only in master pages.

    in master pages for all of the open files.

    How can I do?

    Teetan

    Hi Teetan,

    To set a goal is more of halfway to creation script.

    Check this box:

    app.doScript('main()', ScriptLanguage.JAVASCRIPT, undefined, UndoModes.FAST_ENTIRE_SCRIPT, "grow numbers on masters");
    function main() {
      catchOption = app.findChangeGrepOptions.includeMasterPages;
      app.findChangeGrepOptions.includeMasterPages = true;
      app.findGrepPreferences = changeGrepPreferences = null;
      app.findGrepPreferences.findWhat = "\\b\\d+\\b";
    
    var
      mTarget = app.documents.everyItem().masterSpreads.everyItem().textFrames.everyItem(),
      mFound = mTarget.findGrep(),
      mConFound = [],
      len = mFound.length;
    
      if (len && mFound[0].constructor.name == "Array")
           while (len-->0)
                mConFound = mConFound.concat(mFound[len]);
    
      len = mConFound.length;
      while (len-->0) {
           mConFound[len].contents = String(Number(mConFound[len].contents) + 1);
      }
      app.findChangeGrepOptions.includeMasterPages = catchOption;
    }
    

    Jarek

  • Script a search/replace using a data source

    So I wrote a program (c#) a few years ago which basically opens a file, InDesign Exchange, doing a search/replace, based on a datasourse SQL table and then our graphics people would just convert the INX file in InDesign and ultimately in PDF format.  Too many steps.

    There are more than 2,500 pieces of variable data in each file, so a product like DesignMerge is not practical.  Our database consists mainly of 2 fields [LookFor] and [ReplaceWith], I would like an Indesign script that will just run through the data file and do a find/replace for each record.  Is this feasible and what someone has suggestions or starting points?

    Thank you!

    No, it doesn't matter what format to use: text delimited csv or tab. Of course you can leave it as it is.

  • Application updates in bold and in italics while doing a search/replace on the contents of merged data

    Hello
    Wonder kind knowledgeable people if you can help me with a question find/replace.

    I'm doing a fusion of data of book content in indesign, where my data merge file is a simple text csv file that is delimited by tabs. I have two things (almost like here) I would like to make to specific parts of the text, but do not know how to achieve this.

    -First of all, I would like to preserve the words/phrases of form 'italic', but it's obviously lost in a csv file.  Is there anyway that I can mark these words so a search/replace can make this italic of the word.  Im hoping that there is a solution that looks something like this;
    for example.  Content of the book is 'the italics of the word needs to be adjusted.
    Original content is modified to be "the word $Italic $ $ needs to be adjusted", so that a dollar sign encapsulates the word in italics.
    Then I am able to merge data from the csv file and somehow make a search/replace words/phrases that are wrapped by the dollar sign.  So, do a find/replace all the words/phrases that satisfy this condition and then apply italic to all the words between the dollar signs.

    -My other question is that I use the ' |' character in my text to determine paragraph separators.  I then do a find/replace after you import the text to replace all occurrences of ' |' for the paragraph separator (a kind of symbol $, a representative character in the menu drop down to the right of the change to). It works fine, but I would like to make a "BOLD" format paragraph separator so that it can better distinguish the separation of text sections.

    But this is different from my problem "italic" above, since I am trying to apply a "BOLD" format to the character "change to", rather than something that exists in my original csv.

    Hope I think, but I'd be happy to provide you with screenshots etc. (when I get home at )
    Best Rgds
    L

    two solutions.

    for the solution of italics, I would say that the OP has answered his own question with one exception - do not use the symbols dollar, instead use = or another character that is not reserved by GREP.

    the solution I would use for italics would be a GREP search once the merger completed. Take a look at the picture to see what I did.

    the second solution: styles GREP.

    This means that the text will have a paragraph style are entrusted to him. make a style and character called "BOLD" in this style, the only thing to change is located in basic character formats, set the bold font style. might even make the character another example cyan color is more easily strucure.

    Then go to the paragraph style options, click on GREP styles and correspond to the following screengrab

    the advantage with a GREP style is that once the vertical bar (|) is replaced, the GREP style bold is lost; and that means less post processing and not needing a second search of the text - it's all living.

  • allows you to search/replace to delete certain hidden character

    Hallo, I imported a text file from a CSV using the data merge, now inside indesign text, I find some hidden character as two points (see the screenshot in attachment), what is the code to use in the window search/replace to select and remove all the? I have two years ago but don't remember how.

    Maybe "" in find it field can work (by replacing with nothing). Try first if ID is really something!

  • Do case-insensitive search/replace

    I use the basic find/replace script that comes with CS4

    How can I fix these sort the returned "yd³" does not like Yd³?  I want to do these search/replace case.  Bottom of case 'in' tiny 'out '.   Top of case 'IN' uppercase 'OUT '.

    "text {findWhat:"cu.yd.} ". {changeTo: "yd³"} {includeMasterPages:true, includeHiddenLayers:true, includeFootnotes:true, wholeWord:false} Find out all the dashboard dashboard and replace it with an em dash.
    text {findWhat: "cu.yd"} {changeTo: 'yd³'} {includeMasterPages:true, includeHiddenLayers:true, includeFootnotes:true, wholeWord:false} find all the dashboard dashboard and replace it with an em dash.
    text {findWhat: "vg3"} {changeTo: 'yd³'} {includeMasterPages:true, includeHiddenLayers:true, includeFootnotes:true, wholeWord:false} find all the dashboard dashboard and replace it with an em dash.
    text {findWhat: "cu.yd"} {changeTo: 'yd³'} {includeMasterPages:true, includeHiddenLayers:true, includeFootnotes:true, wholeWord:false} find all the dashboard dashboard and replace it with an em dash.

    Thank you in advance.

    Bill Bernhardt

    Publications of DOOSAN

    770-831-2249.

    Add caseSensitive:true to the list of options.

    Peter

  • Search &amp; replace - can search a nonstandard file extensions?

    I m need to use find / replace to search for text in files with the extension *.ini, but don t DW (CS4) 'open to search for' this type of file, even I select the file and use "selected files to the Site."

    There is a trick to do this?

    TKS

    Baraldi

    I have not tested with search & replace, but instructions on how to get Dreamweaver to recognize other file name extensions can be found here:

    http://go.adobe.com/kb/ts_tn_16410_en-us.

  • Limit search / replace on a table or a spreadsheet

    Is it possible to limit the command find / replace for a selected table or spreadsheet (tab). When I try, search numbers in the entire workbook (all tabs). Excel do not have this limitation. Super annoying, especially since the soft seems to jump from a tab to the tab before answering all the tables in a tab.

    Hi Ty,

    Short answer: feature not available.

    By the numbers, "Worksheet", short for "spreadsheet" refers to the entire document, which may contain several "leaves", each of which can be consulted by clicking its tab at the top of the workspace.

    With the previous version, Numbers ' 09 (version 2.x) Find could be confined to the sheet current, or could search the entire Document. This feature (and many others) did not appear in the new numbering.

    Many extra features have been added to the new application, and have added several new (and useful) features that were not in Numbers ' 09.

    Unfortunately, the possibility of limiting a search to a single sheet or a single table is not (yet) a feature support 3 digit.

    If you want added, go to the menu number (in numbers), select provide feedback numbers and make your request.

    Kind regards

    Barry

  • Can you search / replace by paragraph order?

    I use to identify what story to do this on style of script.

    Once I found this label, I want that javascript to find / replace the style by order the paragraph.  When I import real text, I get a first style expected (using the following Style is me well marginal).  The script I'm writing would be search in history "Paragraph 3" (for example, in appliedParagraphStyle) and replace it with a different style applied.

    The question I have is the research appliedParagraphStyle of the order in which it appears.

    Does anyone do this?  Thank you very much.

    Your interpretation is correct. JS begins the first paragraph with a "0" index.

    So the steps are:

    1. find your labeled textframe. > Instead of the label property, you can also use 'name' by registering a name in the layers panel.

    2 save your paragraphs and directly apply a paragraph style (no need to a GREP) > in my example I go the long way, but you could combine some lines.

    3. identify the para quote and apply quotes. I give you here a simple example. My example fails, if already are in quotes. In this case, the grep to be built differently.

    And one last comment: why do you need 2 frames of related texts? Why not include the title with the functionality of the columns covering?

    var curDoc = app.activeDocument;
    var allTFrames = curDoc.textFrames;
    
    for (var i = 0; i < allTFrames.length; i++) {
      var tFrame = allTFrames[i];
      if (tFrame.label == "format 1") {
        var pStory = tFrame.parentStory;
        var allParas = pStory.paragraphs;
        var first = allParas[0];
        var sec = allParas[1];
        sec.appliedParagraphStyle = "author";
        var third = allParas[2];
        var fifth = allParas[4];
        fifth.appliedParagraphStyle = "quote";
        var fifthContents = fifth.contents;
        var tempString = fifthContents.replace(/(.+)/,"\"$1\"");
        fifth.contents = tempString;
      }
    }
    

Maybe you are looking for

  • G72-260us update

    Hi, I have a question... I own a g72-260us and I want to spend the hard drive with a«Travelstar 1 TB 2.5 'Mobile Hard Drive from HGST oso3563'.»Capacity of 1 TB DriveInterface SATA III32 MB Cache6Gbit/s of data transferIt will work in my laptop. Than

  • VPN disconnects spontaneously - sometimes

    I set up a VPN between two Windows XP systems on two different networks, using the built-in VPN connection from XP. In most cases, the connection remains active without problem. However, on occasion, the VPN disconnects for no apparent reason. I chec

  • Using Windows Movie Maker - background noise

    I am downloading some videos of Window Movie Maker. All the videos have very strong background noise. But when I play videos in real player, the videos play fine without background noise. My husband has used iMovie to edit these videos and has either

  • Volume is available in safe mode

    I have a windows vista laptop, when I turn on safe mode, I can't get the volume to work, how do I fix (please use a simple language, technical terms just his Dutch for me)

  • Close application when the application switch menu item to invoke

    Hello, I made application for blackberry (os 5,6,7), but it has a strange behavior. When I press the switch application menu item, my request is close, so I can't get back to my application once I switched to another application. I have replace my on