kbass said:
> I am receiving a variable from HTML called 'STerr' and reading it into my
> CGI program. The variable is accepted into the program and filters down
> into a SQL statement. My problem is that I get no results from within my
> CGI program but when I place this same SQL statement within Postgres, I
> receive data back.
[snip]
> ##############################
> # Procedure: View_Info #
> ##############################
> sub View_Info {
>
> $sql = "select fyear,
> fqtr,
> adjtype,
> adjref,
> subdist,
> subdate,
> adjgoalvolqty
> from fy04q1bulletin
> where subdist = ?
> ";
>
> $sth = $dbh->prepare($sql);
> * my $territory_quoted = $dbh->quote( $territory);
> ** $sth->execute($territory_quoted);
[snip]
Usually, you want to use *either* $dbh->quote() *or*
$sth->execute($param). Using $sth->execute($param) automagically quotes
for you. So, if I were you, I'd comment out the line I've marked with the
* and then replace the $territory_quoted with $territory in the line I've
marked with ** and try again.
Colin
--
Colin W. Wetherbee
http://hydrogen.denterprises.org/