[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ic] HELP! query returns wrong values (but right number)


> This is wrong:
> 
> my $sqm="SELECT DISTINCT id,name FROM aisle WHERE aisle.id=prodcat.aisle
> AND prodcat.dept=".$deptrow[0];
> 
> Should be:
> 
> my $sqm="SELECT DISTINCT aisle.id, aisle.name FROM aisle, prodcat
> WHERE aisle.id=prodcat.aisle AND prodcat.dept=".$deptrow[0];
> 
> 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.
> 
> Jeff


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...


_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.