Answer the question
In order to leave comments, you need to log in
Escaping object properties in sql?
How to escape such variables $this->data['user_name'] in sql query? The date property is an array.
Tried $this->data['user_name'] and {$this->data['user_name']} and it still doesn't work.
Answer the question
In order to leave comments, you need to log in
Look in the direction of php.net/manual/ru/pdostatement.execute.php, or if everything is really bad php.net/manual/ru/function.mysql-real-escape-string.php
If it’s an array, then it won’t work directly, you need to construct an expression for IN, I once wrote a bug for PDO for this case (and for inserting several lines) pastebin.com/Lisnq0vE
because j++ is to first take the value (0), use it (write it to j), and then only increase
if you do
for (int i = 0; i < 10; i++)
j = ++j;
// или j = j+1;
// или j++
, get 10
In the chewed version, everything is clear, except for the last part, why j = z ?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question