Today i learned how to create stored procedures in MySQL.
DELIMETER //
CREATE PROCEDURE new(IN first INT)
BEGIN
SELECT * FROM table WHERE first_id= first;
END //
Lets say i created this and called it from PHP; CALL new('4');
or i wrote my sql command directly into PHP
$mysqli->query("SELECT * FROM table WHERE first_id= $first");
I have 20 sql commands in my PHP and i am doing them copy past into phpmyadmin as stored procedures. they are not descreasing. Now what i gain from stored procedure? Just a few letter? or??? Thanks for help.