Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Flexible Update SQL

by bichonfrise74 (Vicar)
on Dec 02, 2010 at 01:08 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://874793]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2024-03-28 17:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found