Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2004
    Posts
    2

    Exclamation Unanswered: mysqldump --where condition with LIKE operator

    Hi everybody,

    Can anyone tell me how to use --where option of the mysqldump with LIKE operator?

    I used something like this "--where=field1 LIKE 'prefix%'" but nothing seems to work.

    I want to select for backup only those records that begin with string "prefix"

    Command line works great if where condition is set for other fields like this:
    --where=field2=3 (without any quotes) but I need an where clause like above.

    Thanks for help! :

  2. #2
    Join Date
    Aug 2004
    Posts
    2

    Thumbs up Sorry... I've got the problem solved

    Well in my case what I've forgot to mention is that the mysqldump command was placed in one batch file that was executed periodically. As you know (and I have been forgot) the percent sign is interpreted as a special character. To solve problem I put double percent sign "%%" instead of only one.

    Best wishes,
    Lord Sith

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •