0

I want to learn how to use stored procedures, I want to convert my SQL statements into stored procedures rather than the state they are currently in...

Now, the problem is that most guides, websites, or even forums rarely discuss that a procedure can be added through the "add routine" option in phpMyAdmin thus I couldn't find any guides instructing me on how to fill in the blanks for that GUI window GUI add procedure window

I also want to understand how to call the procedure after I create it in my PHP code.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Zyzzx
  • 45
  • 1
  • 11
  • 1
    You can check out the following links https://stackoverflow.com/questions/17481890/how-to-write-a-stored-procedure-in-phpmyadmin – Victor Alagwu Apr 13 '18 at 21:01
  • @VictorAlagwu the link was very helpful but it doesn't really help me understand what "parameters" are or when to use them, same goes for other fields like "is deterministic" or "definer" or "security type" or "Sql data access" – Zyzzx Apr 13 '18 at 21:06

1 Answers1

1

I have this example: Stored procedure phpmyadmin

And you can call it in php like this: $sales = 'CALL period_sales(:from, :to, :employe);';

I do not have a complete guide, because I look for each process separately.

LuiscYm
  • 171
  • 4
  • what about "is deterministic" or "definer" or "security type" or "Sql data access" how do you use these fields? – Zyzzx Apr 13 '18 at 21:03
  • 1
    Here is a good explanation about: https://stackoverflow.com/questions/20286856/phpmyadmin-stored-procedure-explanation, I hope that help in this questions. – LuiscYm Apr 13 '18 at 21:15
  • Thats way better and thank you but i still need more information as to when to use "parameters" or even what they mean,i still dont know what "security type", i also need an example of someone writting SQL in it to make sure i can use the phrasing of the SQL correctly in "definition" space, not to mention how to call it from a PHP file but thanks alot! Thumbs up for sure. – Zyzzx Apr 13 '18 at 21:24