[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] complex sql select statements
> [seti mysqlvar]SELECT
> code,descrip,longdescrip,featprod,template,sku,image,description,p
> rice,pricel1,pricel2,pricel3,priceeu,priceeul1,priceeul2,priceiep,
> priceiepl1,priceiepl2,pricecorp,pricecorpl1,pricecorpl2,pricecompusd
> FROM cattable left outer join products on cattable.featprod=products.sku
> where pcode=252 order by cattable.displorder[/seti]
> [query arrayref=myref sql="[scratch mysqlvar]"]
> <!-- this container text is not used -->
> [/query]
>
> [perl]
> my $ary=$Tmp->{myref};
> $Scratch->{found}="nothing";
> foreach $line(@$ary)
> {
> $Scratch->{found}="something!";
> }
> [/perl]
> [scratch found]<br>
- What db are you using? Postgres or MySQL?
- If you are using for example postgres, do you get any output when you
enter this query at the postgres prompt?
- If you using the default db (not any sql, postgres etc), then your query
does not work.
- Did you try [set .. instead of [seti...?
- Did you try to add the query direct to the query tag (not via the
scratch)?
- Do you get an output with an simpler query (select * from cattable)?
Rene