View Single Post
Old 12-13-2007, 10:51 PM   #5 (permalink)
xenon
The Frequenter
Newcomer 
 
xenon's Avatar
 
Join Date: Dec 2007
Location: Bucharest, Romania
Posts: 438
Thanks: 3
xenon is on a distinguished road
Default

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.
xenon is offline  
Reply With Quote