What is the case with mysql stored procs and PDO. Spent an hour googling and all I get is conflicting comments that you can or can not access the results of a stored proc.
Otherwise, what is wrong with this
$dbh = new PDO('mysql:host=host;dbname=db', 'user', 'pass');
$stmt = $dbh->prepare('CALL spLogin(?,?,?,?,?)');
$stmt->bindParam(1, $uid, PDO::PARAM_STR);
$stmt->bindParam(2, $pwd, PDO::PARAM_STR);
$stmt->bindParam(3, $clientid, PDO::PARAM_INT, 10);
$stmt->bindParam(4, $uid, PDO::PARAM_STR, 50);
$stmt->bindParam(5, $admin, PDO::PARAM_BOOL, 1);
$stmt->execute();
if (is_null($clientid)) {
error('A database error occurred while checking your '.
'login details.\\nIfhis error persists, please '.
'contact me@mydomain');
All I get is the error message and it is doing me in.