0

Like in a foreach loop below:

foreach ($boos as $boo) {
  ...
  $return_values = $pdo->query("CALL my_stored_procedure('$boo')")->fetchColumn();
  ...
}
Logray
  • 41
  • 3
  • $boos = ["O'Neal"]; go on, try to run it – Your Common Sense Dec 08 '20 at 09:39
  • I get your point, but absolute control in my opinion means that I know that there are only allowed characters in that array. Like 'boo_1'. In this case I believe preparing is not necessary. Correct? – Logray Dec 08 '20 at 09:57
  • Don't you realize that "I know" and "I fancy I have absolute control" are unrelated to Computer Science and rather belong to humanitarian sciences? there is no way to explain to your code that at the some point of time someone had an idea that they have an absolute control, so it should run smoothly. Or, rather, there is - by using prepared statements. So it will be much simpler than telling everyone that you you think that you have some control – Your Common Sense Dec 08 '20 at 10:02
  • Especially given that being a programmer, you can always have both the safety and your precious [one liner](https://stackoverflow.com/a/37506253/285587) – Your Common Sense Dec 08 '20 at 10:07

0 Answers0