jeudi 30 juin 2016

PDO execute() will not accept anything passed to it [on hold]


Thanks in advance. I have tried and tried every option I have searched for and doing this in everyway I know to try. I have a simple execute() that is passed a simple array. It will not accept the parameters. Please help.

Working Example:

$admin->query("INSERT INTO `testtable` (name) VALUES (:name)");
$admin->bind(':name','Alfred');
$admin->execute();

NON Working Example:

$admin->query("INSERT INTO `testtable` (name) VALUES (:name)");
$admin->execute(array("name" => "Alfred"));

Once again, this is an extremely simplified example of what I am trying to do. execute() will not accept any parameter I pass it in any way, array or otherwise.

I had seen something in passing through about a setting that was off that allowed passing of variables through execute(). I am not sure I just don't get why its not working.

Thanks!


I got it. My fault. Once again, overlooking the obvious withing my class....

Aucun commentaire:

Enregistrer un commentaire