Answer the question
In order to leave comments, you need to log in
What is the best way to organize SQL queries?
For the first time I am making a completely website from scratch in pure PHP, and on some pages I have 3-5-10 SQL queries for changing, updating, adding, etc. Perhaps there are some functions, or something that will reduce the number of requests. The essence of the question is how to properly organize an enormous number of queries to the database?
Answer the question
In order to leave comments, you need to log in
See, you can for example use
With regards to inserts
, also this construction
dev.mysql.com/doc/refman/5.7/en/insert-on-duplicate...
When updating Update multiple fields at once
Use mysqli_multi_query
INSERT, UDATE DELETE - unfortunately, as without groupings incorporated in the specification.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question