how to write procedure to insert data in to the table in phpmyadmin?
database, mysql, phpmyadmin, stored-procedures
Solution
Try this-
CREATE PROCEDURE simpleproc (IN name varchar(50),IN user_name varchar(50),IN branch varchar(50))
BEGIN
insert into student (name,user_name,branch) values (name ,user_name,branch);
END
Problem
I have created table as below: ``` student: +----+------+-----------+--------+ |uid | name | user_name | branch | +----+------+-----------+--------+ | | | | | +----+------+-----------+--------+ ``` I want to insert data in to the table using procedure. the procedure which i wrote is: create procedure add(in_name varchar(50),in_user_name varchar(50),in_branch varchar(50)) begin insert into student (name,user_name,branch) values (in_name ,in_user_name,in_branch); end;