View Single Post
Old 09-19-2016, 03:38 PM  
MKA
Hey...
 
MKA's Avatar
 
Industry Role:
Join Date: Nov 2011
Location: NL
Posts: 552
A tiny mysql question

It's late and my brain simply stopped working. I want to sleep but need to finish this so who helps me going to bed....


I need a rather simple command to perform with MYSQL.
Its looks simple.

I have 2 tables in the same database.
table 1 is named= A
table 2 is named= B

In table 1 we have a column called "views"
In table 2 we have a column called "enabled"

Basically. If enabled = 0 then views should be updated to 0

I tried something like this
UPDATE content_views
SET views = 0 ,
WHERE CONTENT.ENABLED = 0

which obviously did not worked.
MKA is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote