mysql - Update row using equation with 2 rows? PHP Mysqli -


i need update row doing subtractions e.g

t1.n1=t1.n1-t2.n2  

i tried this

update table1, table2 set table1.field1 = table2.field1 table1.id = table2.id , triggers 

i have no idea how ? in advance


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

unity3d - Fatal error- Monodevelop-Unity failed to start -