Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^2: I present to you... Horrible code!

by dragonchild (Archbishop)
on Jan 08, 2005 at 17:33 UTC ( #420551=note: print w/replies, xml ) Need Help??

in reply to Re: I present to you... Horrible code!
in thread I present to you... Horrible code!

That said, this function, in its original form, is completely useless, because it is executing a SELECT request from a locally scoped statement handler, and its result would be simply lost.

Oh, there's more fun than that, my friend! There are some databases where you can set up a view in such a way that a SELECT against it actually makes changes to stuff. In Oracle 9, you can actually have it do literally anything, including executing Perl code.

Being right, does not endow the right to be rude; politeness costs nothing.
Being unknowing, is not the same as being stupid.
Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

  • Comment on Re^2: I present to you... Horrible code!

Replies are listed 'Best First'.
Re^3: I present to you... Horrible code!
by hardburn (Abbot) on Jan 10, 2005 at 14:32 UTC

    That's some messy programming-by-side-effect there. Sure, calling an external database is already a side-effect, but it's the sort you pretty much have to live with. If the posted code is using such a view, I wouldn't consider it an improvement.

    "There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://420551]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2018-04-22 20:24 GMT
Find Nodes?
    Voting Booth?