//Now gets ID info from wordpress to be able to insert into META-DATA
$grab = $firstWORDPRESS->prepare
("SELECT
ID
FROM
wp_users
WHERE
user_email = '{$email}'
");
//Executes this little SQL Statement
$grab->execute();
echo ("<p>Your abilites have been added to 1sza</p>");
}
//Catches any errors that might have come from updating the wordpress login
catch (PDOException $ex) {
$msg = $ex->errorInfo;
error_log(var_export($msg, true));
die("<p>Sorry, there was a unrecoverable database error with 1-SZA Wordpress Account. Debug data has been logged.</p>");
}
Now I only gave you the relevant part of the code, because the stuff ahead of this works with out an issue. Anyone see the issue?
For want of a nail...the horseshoe was lost. For want of a horseshoe, the steed was lost. For want of a steed...the message was not delivered. For want of an undelivered message.....the war was lost.
as error says your are making a 'Call to undefined method PDOStatement:repare()', check if there is no spelling mistake, also the related library is being loaded properly.
Simplypixie, I dont need to have 'placeholders' on it since I am not taking it from a form, its comming right out of a database, hence no possibitlity for injection, hence its set in a varible. As for zabi, checked spelling mutlipule times nada. Also library isnt an issue.
For want of a nail...the horseshoe was lost. For want of a horseshoe, the steed was lost. For want of a steed...the message was not delivered. For want of an undelivered message.....the war was lost.
Like the error says, prepare is not defined for objects of type PDOStatement. It is instead supposed to be on PDO, and the return of PDO:repare is a PDOStatement object. However given the code you've shown, I don't know how you are getting that error since you show $firstWORDPRESS = new PDO, then $firstWORDPRESS->prepare(). However, even though the code you showed us looks correct, the error message suggest you are either showing us snippets with pieces missing, or looking at the wrong code for the error.
Bookmarks