lundi 13 février 2017

Valid prepared statement or not?

Vote count: 0

$query = "INSERT INTO users (username,email) VALUES ('bob','test@mail.com')";
$statement = $app->db->prepare( $query );
$statement->execute();

You can see in this code that I prepare the statement on the third line and pass it the query. I'm not sure if this the pdo preparation is correct in this case.

Or is it an obligation to do the placeholder / binding thingy ?

asked 13 secs ago

Let's block ads! (Why?)



Valid prepared statement or not?

Aucun commentaire:

Enregistrer un commentaire