Zend PHP 5 Certification Study Guide by Davey Shafik & Ben Ramsey & Davey Shafik & Ben Ramsey

Zend PHP 5 Certification Study Guide by Davey Shafik & Ben Ramsey & Davey Shafik & Ben Ramsey

Author:Davey Shafik & Ben Ramsey & Davey Shafik & Ben Ramsey
Language: eng
Format: epub, mobi
ISBN: 9781940111100
Publisher: php[architect]
Published: 2014-09-30T16:00:00+00:00


Querying the Database with PDO

To retrieve a result set from a database using PDO, use the PDO::query() method. To escape a value included in a query (e.g., from $_GET, $_POST, $_COOKIE, etc.) use the PDO::quote() method. PDO will ensure that the string is quoted properly for the database used.

Not all database drivers for PDO implement the PDO::quote() method. For this reason, and to ensure the best possible approach to security, it is best to use prepared statements and bound parameters, described in the next section.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.