Interchange Developer Resource


[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date ][Interchange by thread ]

RE: [ic] [perl] problem



> [set cat_wahl]LiYv[/set]
> [scratch cat_wahl]
> [perl]
> $sql='select distinct q_leiter from products where
> category='.$Scratch->{cat_wahl};
> $set=$Db{products}->query($sql);
> 
> for(@$set) {
>      $out .= "NAME: $_->[0]<BR>";
>  }
> $out .= "First value:  $set->[0][0]<BR>";
> return $out;
> [/perl]
> 
> The strange think is when I change the row return $out; to return $sql;
> I can see the correct string:
> select distinct q_leiter from products where category=LiYv.
                                                        ^   ^
This is not correct, should be:
select distinct q_leiter from products where category='LiYv'

strings must be quoted in SQL.

Jonathan
Webmaint.


_______________________________________________
interchange-users mailing list
interchange-users@interchange.redhat.com
http://interchange.redhat.com/mailman/listinfo/interchange-users


Search for: Match: Format: Sort by: