Hi
I have tried to bindvalue a binary string but the PDO is not passing the binary value to the procedure, What am I missing here? If change the input parameter for my getdatapressure to varchar and i change the
bindValue(':uid' , hex($datamodel->getkey($id)))
, it worked.
May I know how to pass the raw binary without convertion? Thank you.
public function actionDatapressure($date_req,$id)
{
$datamodel = new DataKey();
// $datamodel->getkey($id) will return uuid(binary(16) datatype) from a mysql table.
$command = Yii::$app->db->createCommand("CALL getdatapressure(:uid,:dateR)")
->bindValue(':uid' , $datamodel->getkey($id) )
->bindValue(':dateR', $date_req)
->queryAll();
return $command;
}