Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2008
    Location
    Southern California
    Posts
    129
    Plugin Contributions
    0

    Default What is a SQL command to change products_model ?

    I know this is wrong and the syntax isn't right, but I'm trying to find the proper sql syntax to change a product model number. We have to update a bunch of numbers and using the SQL command will go a lot easier than using the admin panel.

    I was playing with this, but I know it's just not right:

    UPDATE products SET products_model = '123-NEW' WHERE products_model = '123-OLD'

    Many thanks in advance

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: What is a SQL command to change products_model ?

    I am not sure where this would be wrong, but if you want to run it from the Install SQL Patches ... you should use:
    Code:
    UPDATE products SET products_model = '123-NEW' WHERE products_model = '123-OLD';
    And all Products with the products_model of 123-OLD will be changed to 123-NEW ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Aug 2008
    Location
    Southern California
    Posts
    129
    Plugin Contributions
    0

    Default Re: What is a SQL command to change products_model ?

    Ajeh, thank you! That's it!
    I was only guessing at my own code.
    I can't believe I was that close!
    It worked! Thanks again!

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: What is a SQL command to change products_model ?

    You are most welcome ... glad to be able to help you out ...

    You were exactly right with your SQL and could have gotten away with it, as is, in phpMyAdmin, but in the Install SQL Patches it requires the semi-colon om the end of each line and a few other rules to follow ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 

Similar Threads

  1. SQL command to update order status ?
    By Akasashasha in forum General Questions
    Replies: 2
    Last Post: 4 Mar 2011, 10:02 AM
  2. metatags_title_status - sql command?
    By Kenichi in forum General Questions
    Replies: 2
    Last Post: 20 Jan 2011, 10:15 PM
  3. SQL command to update category images?
    By Jeff G in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 2 Dec 2009, 10:53 PM
  4. sql command to change values - Canada Post
    By tony_sar in forum Addon Shipping Modules
    Replies: 1
    Last Post: 14 Mar 2009, 07:49 PM
  5. Basic SQL Update command
    By 0be1 in forum General Questions
    Replies: 0
    Last Post: 29 Jul 2008, 02:00 PM

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