I'm trying to add a users access token to my database. I'm using the php mysqlidb connection library.
If I use this function below I get this error:
<b>Warning</b>: mysqli_stmt::bind_param(): Number of elements in type definition string doesn't match number of bind variables in MysqliDb.php</b> on line <b>1092</b>
function connectUser($id, $fbid, $accessToken) {
global $db;
$data = Array (
'fbid' => $fbid,
"access_token" => $accessToken
);
$db->where ('id', $id);
$db->update ('users', $data);
}
I know the accessToken has something in it because if I add an echo in the previous function for the accessToken I get this:
CadC5cqRAZArcBAKDZBZBA2AO5Beu1ZBWLFWl5FZClIuFvcx8jvdBZBTv3t3gplq32dm0gw99u62dQAAoBZC71bvgDYjy5RxnpjYzzUWoOlGmlZAwL4gtregzOF9mOqBtp24mybRVMR14mCmuA7YZAJ8kvxfonv151ZAadhlZCi1TKj8I5guOO2YZC2Vfs
Then try to add it manually it works without the error:
function connectUser($id, $fbid, $accessToken) {
global $db;
$data = Array (
'fbid' => $fbid,
"access_token" => 'CadC5cqRAZArcBAKDZBZBA2AO5Beu1ZBWLFWl5FZClIuFvcx8jvdBZBTv3t3gplq32dm0gw99u62dQAAoBZC71bvgDYjy5RxnpjYzzUWoOlGmlZAwL4gtregzOF9mOqBtp24mybRVMR14mCmuA7YZAJ8kvxfonv151ZAadhlZCi1TKj8I5guOO2YZC2Vfs'
);
$db->where ('id', $id);
$db->update ('users', $data);
}
What's going on here?