Stored Procedures role in Developing Database Applications.
Posted on 2006-04-17
I'm very new to this PHP.
I've to develop one (web) application using MySQL as backend, and PHP as front-end.
My team-lead is insisting me to use Stored-procedures while getting data from MySQL.
So, obiviously I've searched in the net. But I could not able to get clear solution.
Then I got doubt whether they are useful or not. Why because, in most of the books as well as websites all are giving solution with Prepared statements, but not with Stored procedures.
If stored procedures are also good, Can any-one help me in getting the solution for the following problem... please !
My requirement is to pass parameters to retrieve data from database like below.
If there is a table like the following in MySQL Database:
Dept No DName Location
10 Accounting New York
20 Research Dallas
30 Computers Bangalore
40 Electronics Visakhapatnam.
Now I could be able to retrieve Department Name(DName), Location values based on Dept No, that too using stored procedures.
Thanking you very much.