I created a store procedure for selecting use image detail.... I want to fetch user related all images from table....to delete them from my uploads folder.....
For selecting image name I created store procedure in mysql which is below:
DELIMITER //
CREATE PROCEDURE delphoto (IN id INT)
BEGIN
SELECT * FROM tbl_user WHERE fld_userId = id;
SELECT * FROM tbl_user WHERE tbl_spouse = id;
SELECT * FROM tbl_user WHERE tbl_daughter = id;
SELECT * FROM tbl_user WHERE tbl_son = id;
END//
The problem is this: how do I fetch all the result from this query in php by pdo? when I run this store procedure it only returned the first column result of this query
SELECT * FROM tbl_user WHERE fld_userId = id;
..... rest is not executing .... How do I fetch multiple query result from store procedure by pdo php?
SELECT * FROM tbl_user WHERE
fld_userId = id OR tbl_spouse = id OR tbl_daughter = id OR tbl_son = id;
no procedures re1uired