I’ve Googled but come up with nothing that I can get my head around.
Are the performance gains from using stored procedures significant?
Would I still want to use prepared statements in conjunction with stored procs or is it generally a one or the other thing?
Can I create stored procs through PHPMyAdmin and manage them from there as well?
What would a stored procedure look like for something simple like this-
SELECT * FROM table a INNER JOIN otherTable b ON a.join_id=b.join_id WHERE someVar = :boundParam
and how would the PHP work (PDO) to call it and bind its parameter?
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Consider this a gentle introduction to stored procedures in MySQL: http://www.mysqltutorial.org/mysql-stored-procedure-tutorial.aspx
You sure can create/manage stored procedures in phpMyAdmin.
I have created one procedure but the time of call this procedure what parameter I can pass to get the output
CREATE DEFINER=`root`@`localhost` PROCEDURE `A`( In user_id bigint, Out address varchar(250) ) BEGIN select Address into address from UserDetail_table where User_ID = user_id; END