www.webdeveloper.com
Results 1 to 3 of 3

Thread: MySQL update query involving two tables is not working, ...really stumped!

Threaded View

  1. #1
    Join Date
    Mar 2010
    Posts
    281

    MySQL update query involving two tables is not working, ...really stumped!

    i'm really stumped why this SQL statement is not working. I guess my MySQL has gotten rusty.

    PHP Code:
    UPDATE mscanproducts SET mscanproducts.manufacturers_id 37 where 
    mscanproducts
    .products_id mscanproducts_to_categories.products_id and mscanproducts_to_categories.categories_id 5
    The error i'm getting is this.
    PHP Code:
    Unknown column 'mscanproducts_to_categories.products_id' in 'where clause' 
    but i'm sure the column and table do exist

    i'll try to briefly to describe the tables

    mscanproducts:
    products_id | manufactures_id
    1 | null

    mscanproducts_to_categories
    products_id | categories_id
    1 | 5
    Last edited by toptomato; 01-23-2014 at 04:13 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles