Howdy!

 

This will probably show my ignorance, but here goes... 

 

I wrote a couple of app's that work fine until I add a CGI param to the SQL mix.

 

If I hardcode the param in: my $sql = qq/ SELECT * FROM Foo WHERE ID = 123 ORDER BY bar /;

Then each page displays only rows with ID equal to 123 -Works Great!

 

However, If I pass a CGI param /cgi-bin/foo.cgi?ID=456

My $ID = $cgi->param('ID');

$sql = qq/ SELECT * FROM Foo WHERE ID = ? ORDER BY bar /;

$sth->execute($ID) ...

 

I even used associate => $cgi, thinking this would pass the CGI params to the template.

 

The first page displays correctly, but the following pages contain all the data in the table. 

Is there something I am doing wrong or need to change?

 

MTIA - Jeff Pelkey