[ic] HELP! query returns wrong values (but right number)
subscriptions at eichin.org
Tue Mar 29 20:25:59 EST 2005
> This is wrong:
> my $sqm="SELECT DISTINCT id,name FROM aisle WHERE aisle.id=prodcat.aisle
> AND prodcat.dept=".$deptrow;
> Should be:
> my $sqm="SELECT DISTINCT aisle.id, aisle.name FROM aisle, prodcat
> WHERE aisle.id=prodcat.aisle AND prodcat.dept=".$deptrow;
> Without the second table in the from you won't get the relationship.
> It also probably isn't valid sql without it, but of course I have not
> checked that ;)
> I always find it best to ::Log("sql = $sqm\n") then cut N paste that
> into mysql when I have sql errors, it makes debugging a bit easier.
As it turns out, that part works fine. Both ways. The problem I'm
having is, once I have a valid list of SKUs, I can't figure how to pass
them back to IC to display them in a "results" format...
More information about the interchange-users