Windows 7 Loader Extreme Edition 3.544
|Download|
Windows Loader Extreme Edition
EN:
Quick-start guide
Notes:
Start downloading
External links
Download. Win 7 Loader Extreme Edition 3.544
Category:2010 softwareQ:
PHP PDO - How to insert using another statement?
How can I insert a row in the DB using PDO?
$stmt = $pdo->prepare("INSERT INTO users (username, password) VALUES (?,?)");
$stmt->execute(array($username, $password));
When I execute this code it only inserts the password to the DB. How can I insert username, and password using the same statement?
A:
You have to bind the values with $stmt->bindValue() like
$stmt = $pdo->prepare("INSERT INTO users (username, password) VALUES (?,?)");
$stmt->bindValue(1, $username);
$stmt->bindValue(2, $password);
$stmt->execute(); ac619d1d87
Related links:
Comments