note 116039 added to pdo.prepared-statements
| From: | Anonymous | Date: | Fri, 31 Oct 2014 23:11:02 +0000 |
| Subject: | note 116039 added to pdo.prepared-statements | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-200764@lists.php.net to get a copy of this message | ||
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
));
----
Server IP: 72.52.91.14
Probable Submitter: 172.56.26.81
----
Manual Page -- http://php.net/manual/en/pdo.prepared-statements.php
Edit -- https://master.php.net/note/edit/116039
Del: integrated -- https://master.php.net/note/delete/116039/integrated
Del: useless -- https://master.php.net/note/delete/116039/useless
Del: bad code -- https://master.php.net/note/delete/116039/bad+code
Del: spam -- https://master.php.net/note/delete/116039/spam
Del: non-english -- https://master.php.net/note/delete/116039/non-english
Del: in docs -- https://master.php.net/note/delete/116039/in+docs
Del: other reasons-- https://master.php.net/note/delete/116039
Reject -- https://master.php.net/note/reject/116039
Search -- https://master.php.net/manage/user-notes.php