I am trying to update table1 with the number 2 where item from table2 = mi from table1 AND where 2014 is in the cd row from table 2 I am trying to run this in phpmyadmin but I can not figure out what I am doing wrong. I keep getting error 1064. Any pointers or help would greatly be appreciated. product_to_categories = ptc categories_id = ci web_index_all_txt=wiat manufacturers_id=mi CATALOG_DESCRIPTION=cd table1=ptc ci= column in table1 mi= column in table1 table2=wiat item= column in table2 cd= column in table2 UPDATE ptc SET ci=2 SELECT ITEM FROM wiat WHERE wiat.ITEM=ptc.mi AND wiat.cd LIKE '%2014%'; Code (markup):
Can you set up an example of the tables and the sql you are using in sqlfiddle.com You need to create the tables and give some insert statements and press build schema. Then you can put in your update statements (even though they're not working) and then give us the link.
actually what I did incorrectly was my order. can you believe that..I just switched a few things around and that turned out to be my issue.
yup thank you for the suggestion with sqlfiddle I will have to learn how to use it looks pretty cool.