[ale] brain damaged perl DBI

Geoffrey esoteric at 3times25.net
Fri Jan 28 09:02:35 EST 2005


James P. Kinney III wrote:
> On Fri, 2005-01-28 at 06:28 -0500, Geoffrey wrote:
> 
>>James P. Kinney III wrote:
>>
>>>This *&%*^ chunk of perl is not returning anything from the database. Is
>>>there something stupid I have missed (The data is there. A psql query
>>>return two lines which is correct. It does connect to the database as I
>>>copied the connection params from another working area).
>>>
>>># connect to database
>>>  my $dbh = $form->dbconnect($myconfig);
>>>  my $id_start = $form->{id};
>>>  my @clone_list;
>>>  my %clone_test;
>>>  push @clone_list, $id_start;
>>>  $clone_test{$id_start} = 1;
>>>  foreach my $id (@clone_list){
>>>    my $query = qq|SELECT id 
>>>       FROM assembly  
>>>       WHERE parts_id = $id|;
>>
>>I believe you'll need single quotes around $id above.
> 
> 
> It helps even more if $id != NULL

Well, that will never locate anything. :)


-- 
Until later, Geoffrey



More information about the Ale mailing list