Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Flexible Update SQL

by bichonfrise74 (Vicar)
on Dec 02, 2010 at 01:08 UTC ( #874793=note: print w/replies, xml ) Need Help??


in reply to Re: Flexible Update SQL
in thread Flexible Update SQL

I had the same approach that you suggested but there is a problem with this... For example, if the phone and country are null, then the SQL that will be constructed will be:
UPDATE table SET city = 'test_city', FROM ...
This will be incorrect because of the comma after the 'test_city.'

I am not worried about SQL injection attack since this is really something internal and will not be exposed to the outside world.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://874793]
help
Chatterbox?
talexb admires the shimmering pool after an enjoyable hour-long All Hands meeting spent listening with one ear and reading Perlmonks with the other .. ear.
[talexb]: Used all my votes during that meeting .. been a while since I've done that. Now, back to work. Good localtime, monks!
[Corion]: talexb: You enjoyed the All Hands meeting in the pool?!
[Corion]: I understand "surfing" in the pool ;)
[talexb]: Corion I admired the pool .. I wasn't .. soaking in it. ;)
[talexb]: Plus, I've been awy from PM for about three weeks .. needed a bit of catch-up time.

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (12)
As of 2017-07-20 15:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (304 votes). Check out past polls.