I'm starting to use the SP in my DB. thus, I have some questions about it:
1.I'm using WAMPSERVER- How can I access the storedProcedures from phpmyadmin?
or how can i accsess the SP I wrote at all?
2. Where do i write the SP? in php script or in the console?
This is my code- I wrote it in the php script but it doesn't work
Code: Select all
<?php
$mysql_link= mysql_connect('localhost','root','') or die("ERROR:cannot
connect");
echo "connected successfully to MySQL server.";
mysql_select_db('pets',$mysql_link) or die ("could not open db".mysql_error());
echo "connected successfully to pets.";
DELIMITER //
CREATE PROCEDURE InsertData(IN Bname varchar(10) )
BEGIN
INSERT INTO exprience (BookNname)
VALUES (Bname);
END //
DELIMITER ;
CALL InsertData ('Oliver Twist');
mysql_close($mysql_link);
?>