Peter Landis wrote:
> 
> but what if you have a variable set like:
> $sort_selection = "name";
> 
> How do you sort by the variable?
> 
> For instance you cannot do...
> $sqh = $dbh->prepare(q{select name from company order
> by $sort_selection;});

Why not?  The query string is created before prepare is called...

Regards,
Ed Loehr

Reply via email to