Direct queries vs. stored procedures
View Single Post
12-13-2007, 10:51 PM
Join Date: Dec 2007
Location: Bucharest, Romania
Well, since sql queries and php code go in the same place, you can move your code more freely (without having to worry about moving the procedures aswell). Also, it's faster to write a query than a SP, and I consider wrong writing a SP just for the fun of it (replacing queries with SPs, that is). Of course, if I was to make something more advanced, which strictly required operating a database table or more, I would go with SPs and only capture the result with PHP. But I just don't see the usefullness of SPs in plain queries ("select a from b") or simple operations (like a join, for example). I actually saw people who wrote a SP for everything.
I'm strictly talking about PHP and MySQL here.
I have optimistic thoughts, even though sometimes (if not always) life's a bitch.
View Public Profile
Send a private message to xenon
Visit xenon's homepage!
Find More Posts by xenon