mhearse has asked for the wisdom of the Perl Monks concerning the following question:
The problem comes when I go to execute the statement. It's difficult for me to determine which arguments to pass to execute() (the variables for the placeholders in the SQL statement). Is there a philosophy, recommended approach, or module that can help with this? Otherwise, I end up with large if statements calling variations of execute()if ($time) { $sql .= 'AND time = ? '; } if ($date) { $sql .= 'AND date = ? '; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Managing Dynamic SQL
by BUU (Prior) on Jun 25, 2005 at 19:35 UTC | |
|
Re: Managing Dynamic SQL
by davidrw (Prior) on Jun 25, 2005 at 19:44 UTC | |
by bart (Canon) on Jun 26, 2005 at 11:30 UTC | |
|
Re: Managing Dynamic SQL
by CountZero (Bishop) on Jun 25, 2005 at 19:46 UTC | |
|
Re: Managing Dynamic SQL
by srdst13 (Pilgrim) on Jun 26, 2005 at 01:51 UTC | |
|
Re: Managing Dynamic SQL
by NateTut (Deacon) on Jun 25, 2005 at 20:08 UTC | |
|
Re: Managing Dynamic SQL
by simonm (Vicar) on Jun 26, 2005 at 01:50 UTC |