Saklı yordamım için aşağıdaki kodu çalıştırmayı denedim ve satır 14'te hata atar. Hatanın yerini saptayamıyorum, çözmeme yardımcı olun.MySQL saklı yordamlar sözdizimi hatası
DELIMITER $$
CREATE PROCEDURE usp_SetGems (
-- Add the parameters for the stored procedure here
p_requestid int/* =null */,
p_akcija int/* =null */)
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
-- Insert statements for procedure here
if p_akcija = 0 then
declare @v_userId char(36);
declare @v_vingems int;
select @v_userId:=r.user_id, @v_vingems := r.value from Requests r
where r.Id=p_requestid;
update Users
set [email protected]_vingems
where id=v_userId;
else
declare @v_userrId longtext;
declare @v_vingemss int;
select @v_userrId.user_id:=r.user_id, @v_vingemss := r.value from Requests r
where r.Id=p_requestid;
update Users
set [email protected]_vingems
where id=v_userrId;
end if;
end; $$
DELIMITER ;
"İstekler" tablosunun yapısı nedir? – apokryfos
@apokryfos http://prntscr.com/aqxr4o – Dunster
Değer ondalık ve user_id int, değişkenlerinizin veri türleriyle eşleşmiyor gibi görünüyorlar. – apokryfos