Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • 1
    you don't need to prepare a query that doesn't take any input. Commented Jun 15, 2013 at 18:08
  • I disagree with you. Commented Jun 15, 2013 at 18:09
  • prepare prevents against injection, how do you inject a query that's entirely hardcoded in a string? Commented Jun 15, 2013 at 18:17
  • prepare is absolutely needed for insert and update if the query accepts input. please explain why the query you've shown above needs to be sanitized. you wrote the query, there's nothing unknown being added to the query, it does not need to be prepared. Commented Jun 15, 2013 at 18:27
  • You're right for insert and update, I was refering to another context. I always sanitize datas before querying. Commented Jun 15, 2013 at 18:31