Okay, so I have 2 tables, mos_users & mos_tempban .
mos_tempban contains 2 columns: ID & lastvisitdate (last one is not so relevant)
mos_users contains 13 columns, only 2 importent: ID & block

What I am trying to do is: I want to set Block = '1' in mos_users where ID from mos_tempban & mos_users match... How do I do this correctly? I tried

UPDATE mos_users SET block = 1 WHERE mos_users.id IN (select id FROM mos_tempban)

But then the database server started to crash...

Jelle

Recommended Answers

All 2 Replies

Your query is fine. The database server crash must have other reasons.

Yeah.. That's what I am thinking too.. It worked before but since we have split the database server & webserver it doesn't anymore.. Thanks smantscheff!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.