more useful options | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I wrote functions to perform the INSERT, UPDATE, and DELETE queries in the database. They take the column values as named parameters.
Sometimes, in UPDATE and INSERT queries, I do not have values for all the columns. I would like the function to simply use the default value I assign to them in the hash of values, like this:
You get the idea. For example, let's say I only pass it arguments for VALUE1. I would like VALUE2 to contain "two values". However, the @_ seems to replace it with UNDEF. Thanks. PS: If you know of a better way to accomplish this task (have functions do the SQL for you), I would also like to hear them. In reply to Default values in functions arguments by rodry
|
|