Reputation: 4664
I'm trying to create a stored procedure using phpmyadmin.
This is my code:
SELECT *
FROM patient_data
WHERE patient_data.patient_id = p_id AND patient_data.date_of_birth = dob
See a screenshot of my window:
This is my patient_data
table:
Do you have any idea what is wrong?
Thank you in advance!
Upvotes: 0
Views: 77
Reputation: 57131
It looks as though there is some problem with creating the script from that dialog. When you see the parameters being created, the second one is missing (and therefore an extra ,
with no field name.
The problem seems to have been cleared by deleting the second parameter and re-adding it.
Upvotes: 1
Reputation: 128
Try adding another parameter:
In the code do the following:
open cl_cursor for
SELECT *
FROM patient_data
WHERE patient_id = p_id AND
date_of_birth = dob;
If the above solution does not work try adding
begin
open cl_cursor for
SELECT *
FROM patient_data
WHERE patient_id = p_id AND
date_of_birth = dob;
end;
Upvotes: 0