Answer the question
In order to leave comments, you need to log in
How to write a simple query with IF ELSE in MySQL?
Please write an example.
What I want:
if my SELECT query finds a unique ID, then I don't make an INSERT query. If it does not find it (the query returns nothing), then I make an INSERT query.
I don’t want to set a condition in php and make two requests, but immediately write everything in one for optimization.
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