sorry i wrote in german… Here again…
I’m stuck and hope you can help me!
I have a mysql database with two tables: booking and article. They are linked via booking.Uid and article.booking_Uid. There can be several articles in each booking.
I want to change booking.status to "Ready for price" of all bookings if there is an article in this booking that has the value "xxx" in the tid field. So far so simple…
In addition, there may not be an article with price = 9999 in this booking.
This last point is where I fail!
Thank you in advance
UPDATE booking
SET status = 'Preis-fertig'
WHERE Uid IN (
SELECT Uid
FROM (
SELECT b.Uid
FROM booking b
JOIN article a ON b.Uid = a.booking_Uid
WHERE a.tid = 'xxx' AND a.price != 9999
) AS subquery
);
Second Part is wrong….
2
Answers
If these conditions must refer to the same row then:
If these conditions may refer to different rows then: