php - MySQL stored procedure ignores DELETE statement -


i have stored procedure gets called php script. has few select statement , delete statement. works fine apart delete query not executed. gets ignored !! please help. thanks

create procedure `proc_name`(in id int, in type char(50)) deterministic comment 'procedure' begin  declare legacy_en_id int; set in_id = id; select  if(e.legacy_id > 0, e.legacy_id, 0) legacy_en_id tablename e e.id = in_id limit 1;  /* delete record if exists */         delete         tablename         entityid = legacy_en_id; 

  1. check user executes stored procedure have permission that.
  2. this can checked directing connecting through mysql command line same user , try execute query generated in stored procedure.
  3. or create simple php script , call directly delete sql using mysql_query. if success have access.

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -