Answer the question
In order to leave comments, you need to log in
What to read on compiling safe sql queries?
I found a rather interesting article on Habré on protection against SQL injections. Everything would be fine, but the article was written five and a half years ago. As a person who recently started learning PHP and SQL, it is difficult for me to assess the relevance of what was written, but there is a suspicion that a lot of things have changed during this time.
As a matter of fact, the question is: maybe there is something similar, but adjusted for new versions and current trends in general? I will make a reservation that I would like to find material similar in style and semantic content to the article I cited. Well, that is, without any many hours of video courses and huge books.
Answer the question
In order to leave comments, you need to log in
Everything is still up to date. What was written was relevant 10 years ago, it will be relevant for a long time to come. The principles are the same. Nothing changed. The author of that article is a very authoritative comrade and "ate the dog" on this topic. He "taught" many people online even when 95% of the toaster population walked under the table. By the way, his website is also - phpfaq.ru with very valuable information.
The basic principles are basic and do not change over time. I would just rephrase it a little differently,
And I would also add that these rules must be observed unconditionally, in 100% of cases, without reasoning like "this data is safe with us, they can not be protected."
If we talk about trends, then practically no one works with pure SQL now. 95% of requests are made through ORM. Those. instead of
$stmt = $pdo->prepare("SELECT * FROM user where id = ?");
$stmt->execute([$id]);
$user = $stmt->fetch();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question