Howdy all, one thing that I would like to do with bind_columns() is to have it dynamically adjust the variable list. I'd like to use the same prepare/execute/bind_columns in a loop but insert different select strings for the prepare statement.
With this there may be a different number of variables returned depending on the select statement. One could just make an if statement to detect that but it would be far better if the one could just say that the var names are of the form $Col# and let it fill in the number value up to the number of values returned. Thus dynamically preparing the proper number of vars. If throws an error if you alocate too many ahead of time rather than just NULL filling them or leaving them undefined.
Is this even possible?
Alan D.
What you need to do is generate your SQL to match your variable list. One method for doing that is to use DBIx::Class. While I generally generate my own SQL, I have had a fair bit of experience with DBIC lately.