[ic] Query: unable to find base table

Marty Tennison marty.tennison at dripdepot.com
Wed Sep 28 00:16:14 UTC 2011


On Tue, Sep 27, 2011 at 5:10 PM, Paul Jordan <paul at gishnetwork.com> wrote:

>
> 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
>
>
Did you open the table before calling the query?  Something like...

[perl tables="sb_data"][/perl]



-- 

- - -- ---- ---------------------------------------------------- --- -- - -

*Marty Tennison*

- -- --- ---------------------------------------------------------- --- --
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.icdevgroup.org/pipermail/interchange-users/attachments/20110927/be2ee266/attachment.html>


More information about the interchange-users mailing list