B
B
BonBon Slick2016-09-27 23:06:02
MySQL
BonBon Slick, 2016-09-27 23:06:02

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

3 answer(s)
M
Mikhail, 2016-09-28
@BonBonSlick

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

E
eqcodes, 2016-09-27
@eqcodes

INSERT, UDATE DELETE - unfortunately, as without groupings incorporated in the specification.

S
sim3x, 2016-09-27
@sim3x

Premature optimization is worse than what?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question