Skip to content
Advertisement

Tag: prepared-statement

PDO were rows affected during execute statement

I have found many ways to use the exec statement for PDO, but I’m not sure it helps me. My understanding is that I have to use the execute() function for prepared statements. I am updating a row with data from user input, so I would like to use a prepared statement instead of the query() call. My code is

Why MySQLi prepared statements?

What are the advantages of using prepared statements with MySQLi? If the only purpose is to secure the query, isn’t it better to clean the query using something like mysqli_real_escape_string instead of writing so many lines of code for each query (like prepare, bind_param, execute, close, etc.)? Answer Preparing statements is not just for code security. It helps the SQL

Advertisement