Search code snippets, questions, articles...

DELETE using bindValue

<?php
protected function deleteUser($firstname, $lastname){
    $sql = 'DELETE FROM users WHERE firstname = :firstname && lastname = :lastname';
    $stmt = $this->connect()->prepare($sql);
    $stmt->bindvalue(':firstname', $firstname, PDO::PARAM_STR);
    $stmt->bindvalue(':lastname', $lastname, PDO::PARAM_STR);
    $stmt->execute();
}
Best JSON Validator, JSON Tree Viewer, JSON Beautifier at same place.

DELETE

bindValues

Search Index Data (The code snippet can also be found with below search text)

bindValues
DELETE
Was this helpful?
0 Comments