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;
- check user executes stored procedure have permission that.
- this can checked directing connecting through mysql command line same user , try execute query generated in stored procedure.
- or create simple php script , call directly delete sql using mysql_query. if success have access.
Comments
Post a Comment