Background: I want to ban all members who have a URL in their profile and have 0 posts. So I am trying to change the usergroupid of all members who meet two criteria.
I'm new to MySQL, so I'm not sure how to query two different tables. I've tried various combinations, but none seem to work.
I've tried two queries, neither of which worked. Here they are:
No dice.
Also didn't work.
Can you let me know where I'm going wrong? Or what terms to search for?
Thanks!
(Note: I'm changing a bit of information in the above, but the idea is the same.)
I'm new to MySQL, so I'm not sure how to query two different tables. I've tried various combinations, but none seem to work.
I've tried two queries, neither of which worked. Here they are:
Code:
UPDATE user SET usergroupid = 8 WHERE `user`.`posts` = '0',`userfield`.`field1` = 'www.example.com'
Code:
UPDATE user SET usergroupid = 8 WHERE `user`.`posts` = '0' AND `userfield`.`field1` = 'www.example.com'
Can you let me know where I'm going wrong? Or what terms to search for?
Thanks!
(Note: I'm changing a bit of information in the above, but the idea is the same.)
Comment