What does bind_param() do?

前端 未结 1 977
北恋
北恋 2021-01-05 09:23
$resultSpendStmt = $connection->prepare(...);
$array->bind_param(\"sdidi\", $A, $B, $C, $D, $E);
$array->execute();
$array->store_result();
$array->bi         


        
相关标签:
1条回答
  • 2021-01-05 10:04

    When you prepare an SQL statement, you can insert a placeholder (?) where a column value would go, then use bind_param() to safely substitute that placeholder for the real column's value. This prevents any possibility of an SQL injection.

    You can read more about bind_param() here.

    0 讨论(0)
提交回复
热议问题