[ic] Difficulties grabbing sql data within perl tags.

Jon Jensen jon at endpoint.com
Thu Jan 6 12:00:13 EST 2005

On Thu, 6 Jan 2005, Cameron G wrote:

> The really strange thing is that your code is (as far as I can tell) 
> precisely the same as what I had already:
> my $results = $Db{orderline}->query( {sql => "SELECT description FROM
> orderline WHERE order_number = '$line->{order_number}'"});
> Vs.
> my $ordersql = "select description from orderline where order_number =
> '$line->{order_number}'";
> my $results = $Db{orderline}->query({ sql => $ordersql });
> To think that creating a string and using it in the query would break rather
> than using it inline.

It shouldn't. Almost certainly something else has changed along the way. 
There should be absolutely no difference between supplying your query in a 
literal string or in a variable. I'd look for other explanations ...


Jon Jensen
End Point Corporation
Software development with Interchange, Perl, PostgreSQL, Apache, Linux, ...

More information about the interchange-users mailing list