Here is my stored procedure.
Code:
DELIMITER //
drop procedure if exists update_city_category;
create procedure update_city_category(in tb varchar(255))
begin
declare i int;
declare t_city varchar(255);
declare t_cat_id int;
declare t_cursor cursor for 
select city, cat_id from tb;

set i = 0;

open t_cursor;
while i<100 do      
  fetch t_cursor into t_city, t_cat_id;
  update city_category set included = 1 where city = t_city and cat_id =    t_cat_id;
  set i = i+1;
end while;
close t_cursor;
end //

DELIMITER ;
When I executed this procedure by using "call update_city_category('gold');" , I got an error "table tb doesn't exist". So I guess I need to use prepared statement? But how should I use prepared statement in this stored procedure?Thanks.