On Friday, April 19, 2002, at 07:18  AM, bernabe diaz wrote:

> Hi everyone,
> could somebody help me with the following problem:
> i have a code something like that
> my  $variable = CGI->param('NAME');
> #making connection to database
> .................................
> my $variable_ =$dbh->quote($variable);
> .........
>
> $sth = ->$dbh->prepare(" SELECT  something FROM some_table WHERE some_key=
> $variable_")
> ............

i think you need to put single quotes around $variable_.
$sth = ->$dbh->prepare(" SELECT  something FROM some_table WHERE some_key=
'$variable_' ");


> then when I try to pass $variable_    to a SQL statment the value of 
> $variable_ was not passed
> so i can't fetch information fro the database.
> when i give the string to the SELECT statement  directly every thing is 
> fine, is working, that's why
> I consider that it is a problem of interpolation of the variable .
> could anybody help me
> Thanks,
> BD
>
>
> -- To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

Reply via email to