note 125732 added to pdo.prepared-statements

From: Date: Thu, 28 Jan 2021 05:38:41 +0000
Subject: note 125732 added to pdo.prepared-statements
Groups: php.notes 
Request: Send a blank email to php-notes+get-216243@lists.php.net to get a copy of this message
it is a good practice not using double quotes in sql strings. This way you can ensure that no variable is injected in query. a simple query with parameters should be; 'INSERT INTO REGISTRY (name, value) VALUES (?, ?)' not "INSERT INTO REGISTRY (name, value) VALUES (?, ?)" ---- Server IP: 45.112.84.4 Probable Submitter: 45.91.159.166 (proxied: 88.225.225.20) ---- Manual Page -- http://php.net/manual/en/pdo.prepared-statements.php Edit -- https://master.php.net/note/edit/125732 Del: integrated -- https://master.php.net/note/delete/125732/integrated Del: useless -- https://master.php.net/note/delete/125732/useless Del: bad code -- https://master.php.net/note/delete/125732/bad+code Del: spam -- https://master.php.net/note/delete/125732/spam Del: non-english -- https://master.php.net/note/delete/125732/non-english Del: in docs -- https://master.php.net/note/delete/125732/in+docs Del: other reasons-- https://master.php.net/note/delete/125732 Reject -- https://master.php.net/note/reject/125732 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#216243) next »