![]() |
Anyone good with MySQL Queries?
I'm trying to write a query and I'm having some problems getting it to do what I want.
I want to compare columnA.commenter_id to all the values in columnB.user_id if there is no columnA.commenter_id that corresponds to a columnB.user_id then set columnA.commenter_id to = 999999. Thanks in advance. |
UPDATE TABLE_1 LEFT JOIN TABLE_2 ON TABLE_1.COLUMN_1= TABLE_2.COLUMN_2
SET TABLE_1.COLUMN = EXPR WHERE TABLE_2.COLUMN2 IS NULL Sorry. Just lazy and posting from MySQL docs. |
Quote:
I suck at mysql this was taking me forever. I know a few guys that know way more then me and they couldn't do it either. Big thanks! |
So you got the answer? Bump if more answers needed.
|
All times are GMT -7. The time now is 11:15 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123