note 116039 deleted from pdo.prepared-statements by salathe

From: Date: Fri, 07 Nov 2014 11:08:12 +0000
Subject: note 116039 deleted from pdo.prepared-statements by salathe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-200829@lists.php.net to get a copy of this message
Note Submitter: Anonymous ---- Here is a real world example of PHP PDO prepared statements as auto generated by an expert system, WizzyWeb: $handler = new PDO('mysql:host=localhost;dbname=db', 'username', 'password'); $sql = "INSERT INTO Employees (EmployeeFirstName, EmployeeLastName, EmployeeOffice, EmployeeDepartment, EmployeeEmailAddress, EmployeeExtension, EmployeeTitle) VALUES (:EmployeeFirstName, :EmployeeLastName, :EmployeeOffice, :EmployeeDepartment, :EmployeeEmailAddress, :EmployeeExtension, :EmployeeTitle)"; $query = $handler->prepare($sql); $query->execute(array( ':EmployeeFirstName' => $EmployeeFirstName, ':EmployeeLastName' => $EmployeeLastName, ':EmployeeOffice' => $EmployeeOffice, ':EmployeeDepartment' => $EmployeeDepartment, ':EmployeeEmailAddress' => $EmployeeEmailAddress, ':EmployeeExtension' => $EmployeeExtension, ':EmployeeTitle' => $EmployeeTitle ));

« previous php.notes (#200829) next »