Re:Whatever happened to programming?
by james2vegas on Thursday March 04, 2010 @06:42AM
(#1166658)
'SELECT * FROM user WHERE id = ?'
OR
'SELECT getUser(?)' presuming you have a stored procedure/function getUser that returns the data you need, and you should (or a view, at least)
[ Parent
| on HN ]
Re:Whatever happened to programming?
by mattmanser on Thursday March 04, 2010 @07:43AM
(#1166751)
SELECT *? A function in the SELECT statment?
Oh dear god, a blasphemer!
The former can cause performance problems if you have blobs as well as being an unnecessary security hole, the latter can cause performance problems over large datasets as it often forces the execution plan away from a set based solution.