Thread: SQL help

Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2006
    Posts
    41
    Plugin Contributions
    0

    Default SQL help

    I don't know if this is a good place to post such a question, but if so, here we go!

    I need to do somthing like this -

    UPDATE products SET product_is_always_free_shipping = '1' WHERE products.products_id = products_to_categories.products_id AND products_to_categories.categories_id = 103

    I don't know how to perform a join on an update query, and this is not working, telling me

    #1109 - Unknown table 'products_to_categories' in where clause

    But that table exists, hence my sql fu is not strong...

  2. #2
    Join Date
    Feb 2006
    Posts
    41
    Plugin Contributions
    0

    Default Re: SQL help

    OK - I found my problem (need to include all table names after UPDATE).

    My question now is

    What is the syntax to update multiple categories at once?

    UPDATE products, products_to_categories SET products.product_is_always_free_shipping = '1' WHERE products.products_id = products_to_categories.products_id AND products_to_categories.categories_id = ********LOTS OF CATEGORIES***********

 

 

Similar Threads

  1. SQL help
    By DigitalShadow in forum General Questions
    Replies: 13
    Last Post: 14 Jul 2010, 07:12 PM
  2. Help with Zipcodezone SQL or with a SMC sql for it...
    By GypsyPhoenix in forum Addon Shipping Modules
    Replies: 0
    Last Post: 3 Apr 2010, 09:50 PM
  3. SQL help
    By damiantaylor in forum General Questions
    Replies: 4
    Last Post: 26 Mar 2010, 07:27 PM
  4. Help about error 1146 Table.. SQL database Help
    By falerohydro in forum General Questions
    Replies: 2
    Last Post: 25 Feb 2008, 08:29 AM

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