Question : question on developing database applications

when developing a database application, is it better practice to access a database from php files via calling stored procedures or integrating the SQL into the php scripts.
I guess also with other languages, java, etc., what is the best practice for this?

Answer : question on developing database applications

Generally Speaking this can depend on what you want to do.
In some cases you my not be able to use stored procedures .. but generally speaking:

using stored procedures improves security a lot, as you cannot easily "hack" them by code injection
They should be a lot faster as they are entirely executed on the server and if done well, it should reduce the amount of data transferred between the client and the server.

So, as a general rule, if you can do the job with stored procedures, do it.
Random Solutions  
 
programming4us programming4us