Answer the question
In order to leave comments, you need to log in
Prepare statement for search?
Hello.
I'm doing a search, and I thought if I'm doing it right, in terms of protection against sql injections.
I make a request like this:
SELECT r.*, u.nickname AS 'u_name', t.taste, t.recept_id
FROM recept AS r
LEFT JOIN users AS u ON u.id = r.user_id
LEFT JOIN tastes AS t ON t.recept_id = r.id
WHERE r.name LIKE '%ppl%' AND t.taste LIKE '%дк%'
Answer the question
In order to leave comments, you need to log in
User input can never be trusted!
Read https://habrahabr.ru/post/148151/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question