pdo php select variable
This is an immense benefit for people and companies that need it. The semicolon indicates the end of the query string; the rest of the variable is treated as a comment by the SQL engine, but counted as part of the input_parameters by PHP. Creating a Simple SELECT Query. This is a SELECT query, but we can still pass variables PHP using PDO to query mysql and return results Unfortunately there is no PHP/MySQL vids here on treehouse yet but I was hoping someone with some experience could help me out. Represents a prepared statement and, after the statement is executed, an associated result set. This is a SELECT query, but we can still pass variables The rules of adding a PHP variable inside of any MySQL statement are plain and simple: Any variable that represents an SQL data literal , (or, to put it simply - an SQL string, or a number) must be added through a prepared statement . As a result, half of PDOs features remain in obscurity and are almost never used by PHP developers, who, as a result, are constantly trying to reinvent the wheel which *already exists in PDO. use PDO paremeterized prepared statements You can then do something like: $pdo_obj = new Not only can be $_POST be modified within the PHP script (because it is a superglobal variable - not a Superglobal constant), but your script can be called by techniques other than submitting the form - including but not limited to: making a separate page that has a