Answer the question
In order to leave comments, you need to log in
How to substitute a value depending on the presence of a record in another MySQL table?
Good day
There is a table Pricelist:
and a table Lots:
Task: if for a row from the table Pricelist , where id = 2 (id is substituted by PHP), there is a row in the table Lots , where the fields Pricelist.ID = Lots.ID_of_price AND Pricelist.prices = Lots.prices , then update Own_Price = 1 (for the row where id = 2), otherwise update Own_Price = 0 (for the row where id = 2)
Is it possible to do this somehow using only one MySQL query (request is sent from PHP) ?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question