Try this sql code:
delimiter $$
drop procedure if exists question_inactivity;
create procedure question_inactivity()
begin
delete from questions_temp where active= 1;
update questions set active = 0 where question_id in(select question_id from questions_temp);
drop table questions_temp;
end $$
delimiter;
------------------------------UPDATE------------------------------------
I running this in phpmyadmin and it'works:
delimiter $$
create procedure question_inactivity()
begin
delete from questions_temp where active= 1;
update questions set active = 0 where question_id in(select question_id from questions_temp);
drop table questions_temp;
end
$$
In the Delimiter input field i put this value: $$
;wherever necessary , inside the [ mysql block ]