Direct queries vs. stored procedures
View Single Post
12-13-2007, 11:09 PM
Join Date: Nov 2007
Originally Posted by
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 think I understand where you're going with this. And the way Salathe described it, he's thinking about the in-depth database layout. This is simply for getting the queries.
"Life is a bitch, take that bitch on a ride"
View Public Profile
Send a private message to ReSpawN
Visit ReSpawN's homepage!
Find More Posts by ReSpawN