Error 1305 Error: PROCEDURE x does not exist.
I have the following proceduree defined in a 5.1.30 community server:
FUNCTION jmc_2010.`fn_updatePerson`(p_personId int
,p_firstName varchar(45)
,p_lastName varchar(45)
,p_middleName varchar(45)
,p_nickname varchar(45)
,p_title varchar(45)
,p_birthDate varchar(45)
,p_notes varchar(45)) RETURNS tinyint(1)
DETERMINISTIC
BEGIN
UPDATE jmc_2010.Person SET first_name=p_firstName
,last_name=p_lastName
,middle_name=p_middleName
,title=p_title
,birth_date=p_birthDate
,notes=p_notes
,nickname=p_nickname
WHERE uid=p_personId;
RETURN TRUE;
END;
I call this function from PHP using this PHP function:
public static function updatePerson_sp($personId
,$firstName
,$lastName
,$middleName
,$nickname
,$title
,$birthDate
,$notes){
$mysqli = DatabaseUtility::connectDB();
if (!$mysqli) {
$returnStatus = false;
}
$sSQL = "call fn_updatePerson(?,?,?,?,?,?,?,?)";
$stmt= $mysqli->prepare($sSQL);
$stmt->bind_param("ssssssss",$personId
,$firstName
,$lastName
,$middleName
,$nickname
,$title
,$birthDate
,$notes);
$stmt->execute();
printf("Error: %s.\n", $stmt->errno);
printf("Error: %s.\n", $stmt->error);
$mysqli->close();
$returnStatus = true;
return (1 == $isAuthenticated);
}
However, I get the following error
Error: 1305. Error: PROCEDURE jmc_2010.fn_updatePerson does not exist.
Can someone tell me what I am doing wrong?