sharezack Posted January 12, 2007 Share Posted January 12, 2007 Hello friendsi am having a problem in my update function.I have two tables buyselldata table and autozack_signal tablebuyselldata bsignal coloum has to be updated with Close_Price in autozack_signal table if macd_buy in autozack_signal is 1common field in both tables are Script_Name "Update buyselldata b set b.buy = a.Close_Pricewhere exists(select Close_Price from autozack_signal a where a.script_Name = b.script_Name and a.macd_buy=1)";i am getting -1 for mysql_error()pls help me Quote Link to comment Share on other sites More sharing options...
Barand Posted January 12, 2007 Share Posted January 12, 2007 DISCLAIMER: Untested, so backup tables first UPDATE buyselldata b , autozack_signal a SET b.buy = a.Close_PriceWHERE a.script_Name = b.script_NameAND a.macd_buy=1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.