[ic] Query: unable to find base table
Paul Jordan
paul at gishnetwork.com
Wed Sep 28 00:10:09 UTC 2011
IC 5.6.3, This works:
[query table="sb_data" sql=|
select *
from (
select *
from sb_data
where user_id=3
or group_id=3
or (user_id=0 and group_id=0)
order by (user_id=3) desc, (group_id=3) desc
) x group by name_id
|]
Adding another table as if you were going to do a join throws an error:
[query table="sb_data" sql=|
select *
from (
select *
from sb_data d, OTHERTABLE o
where user_id=3
or group_id=3
or (user_id=0 and group_id=0)
order by (user_id=3) desc, (group_id=3) desc
) x group by name_id
|]
ERROR: Unable to find base table in query: SELECT *
It would seem it is as simple as the query tag is ignoring the table
parameter, grepping the SQL and having difficulty finding it.
Any ideas?
Paul
More information about the interchange-users
mailing list