I was trying to insert into my users table...simple insert using PDO:
Code: Select all
private function createNewPerson(){
// insert into the users table
$conn = Connection::getConnection();
$st = $conn->prepare('INSERT INTO USERS ' .
'(first_name, last_name, email_address, password, ' .
'password_salt, member_active, password_change_required, ' .
'is_administrator) VALUES (?,?,?,?,?,?,?,?)');
$userData = array(
$this->getFirstName(),
$this->getLastName(),
$this->getEmailAddress(),
$this->getPassword(),
$this->getSalt(),
$this->isActive(),
$this->isPasswordChangeRequired(),
$this->isAdministrator());
$st->execute($userData);
print "inserted " . $st->rowCount() . " rows.\n";
$conn = null;
}
Code: Select all
inserted 0 rows.If I wasn't bald already, I would be now...
Hope this helps somebody!