Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2011
    Posts
    77
    Plugin Contributions
    0

    Default Help with MySQL query

    Hi All,

    Have a problem related to IH5 . In my MySQl database 'products' table and 'products_image' column I have strings like 'Images\A995\A995.jpg'

    Anything with a backslash wont work with Image Handler . So need to swap this out . For example Images/A995/A995.jpg to Images\A995\A995.jpg


    Code:
    UPDATE `products` SET `products_image` = REPLACE(`products_image`,`\`,`/`)

    Above is code i'm working with in PHPadmin. I guess I'm having problems with the backslash

    \\ A backslash (\) character
    Can anyone help with this one ?

  2. #2
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,145
    Plugin Contributions
    11

    Default Re: Help with MySQL query

    In this case, you would want to replace rather than update.
    https://www.w3resource.com/mysql/str...e-function.php

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,478
    Plugin Contributions
    88

    Default Re: Help with MySQL query

    ... or this StackOverflow posting: https://stackoverflow.com/questions/...slash-in-mysql. Note, especially, the last comment on that posting.

  4. #4
    Join Date
    Sep 2011
    Posts
    77
    Plugin Contributions
    0

    Default Re: Help with MySQL query

    Thanks all, got it working !

    It was the escaping of \ that tripped me up

 

 

Similar Threads

  1. v155 Help with a MySQL query
    By lat9 in forum General Questions
    Replies: 7
    Last Post: 26 Apr 2016, 10:11 PM
  2. v154 Quick help with MySQL Query - Selecting OLD Product at Random
    By Jeff_Mash in forum Setting Up Specials and SaleMaker
    Replies: 21
    Last Post: 24 Nov 2015, 12:05 AM
  3. Need help with a mySQL Query
    By jeffmic in forum General Questions
    Replies: 3
    Last Post: 19 Dec 2010, 02:21 PM
  4. Help for mysql query!!
    By g.nencini in forum General Questions
    Replies: 2
    Last Post: 13 Jul 2009, 05:32 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR