3
Answers

get error in mysql

snowal raj

snowal raj

7y
316
1
hai,
 
when i excute  this query i het error
DROP PROCEDURE IF EXISTS ICCTRACE.pset_Client;
CREATE PROCEDURE ICCTRACE.`pset_Client`(
$Name varchar(50),
$Email varchar(50),
$IsActive int(11),
$Mode int,
$id int
)
if $Mode=0 then
insert into tbl_mst_client (client_name,client_name,created_date,is_active)
values($Name,$Email,now(),$IsActive);
else if $Mode=1 then
update tbl_mst_client set client_name=$name,client_name=$Email,is_active=$IsActive where client_id=$id;
else if $Mode=2 then
delete from tbl_mst_client where client_id = $id;
else if $Mode=3 then
SELECT * FROM tbl_mst_client;
end if;
the error is
MySQL Database Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'end' at line 19
pls give sln 
Answers (3)