Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Data Search –> Replace

forums forums SQLyog SQLyog: Bugs / Feature Requests Data Search –> Replace

  • This topic is empty.
Viewing 6 reply threads
  • Author
    Posts
    • #12527
      Malte Witt
      Member

      Hey all,

      SQLyog is a clearly a great piece of software, but there is one little feature I always miss. When using the data search feature I can't automatically search/replace the term.

      For instance I need to move wordpress installations really often (like daily, migrating from stage to live etc. …) and now I always need to dump the db replace the url x thousand times using my local editor and then reupload the db again. So data search with search/replace would be the greatest feature ever for me. 🙂

      Any chance to have this in SQLyog?

      Greetings,

      Malte

    • #32902
      peterlaursen
      Participant

      So you are requestion a 'BULK UPDATE' / 'BULK REPLACE' option so that all instances of 'this string' should be replaced with 'that string'? Such option would not only apply to Data Search then, but would be equally relevant in DATA tab and RESULT tab as well.

      And what about other datatypes? It could very well end up being a pretty unsafe feature wiht integers in particular, I think.

    • #32903
      Malte Witt
      Member

      Thank's for your reply!

      Yes, you understood correctly what I'm asking for and you are also right that this would be a feature that would have to be used wise. Actually an other big problem are applications that store serialized arrays in the database and when doing string replacement those get screwed cause the length doesn't match anymore … but all the problems you can imagine would also occur if you do string replacement in a sql dump file and that's what all the folks have to do in the moment as there is no other way of changing the url for applications that massively store their url in the database …

    • #32904
      Exzo
      Member

      Just make a special script for that. The effort would pay off easily.

    • #32905
      Malte Witt
      Member
      'Exzo' wrote:

      Just make a special script for that. The effort would pay off easily.

      hmmm … how should a sql script look like that does string translation in any table of a db? I can't think of a solution for that in sql. 🙂

    • #32906
      Exzo
      Member

      PHP / Perl / Ruby / Python / whatever

      Something like:

      Code:
      loop thru (“SHOW TABLES”) {

      loop thru (“SHOW COLUMNS IN $table”) {

      “UPDATE `$table` SET $field = REPLACE($field, '$srch', '$replc')”;
      }
      }

      Or even simpler – use `information_schema` .`COLUMNS`. This makes it possible to make stored procedure for SQL-only solution.

    • #32907
      peterlaursen
      Participant

      I have added this reqeust here: http://code.google.com/p/sqlyog/issues/detail?id=1737

      But I do not guarantee that we will ever implement it.

Viewing 6 reply threads
  • You must be logged in to reply to this topic.