[ic] How to make a query disappear...or [query help] (is there a bug in IC's query ability?)

Jordan interchange-users@icdevgroup.org
Fri Jul 26 17:16:01 2002


Hi.
I've tried every permutation that I can think of:
I have tried leaving out the tablenames in the select statement as well as
the [sql-param field] tags.  I've tried using the INNER JOIN ... ON syntax.
basic code:

[query sql="SELECT orderline.sku, orderline.quantity, orderline.subtotal,
transactions.lname, transactions.fname, transactions.status,
transactions.comments FROM orderline, transactions WHERE
orderline.order_number = transactions.order_number"
      type=list
      more=1
        ml=50]

   [on_match]Matched<br>[/on_match]
      [no_match]Not Found<br>[/no_match]
      [list]
        [sql-param sku] [sql-param lname] [sql-param therestofthefields]<BR>
      [/list]
      [more_list]
        [more]
      [/more_list]
   [/query]



If the sql has "tablename.fieldname" as opposed to simply "fieldname", the
query result is empty.  I can find no way to join the tables.  I've tried
simply listing the field names, but then there is no way to specify the join
field.  (ie.  "WHERE orderline.order_number = transactions.order_number"
breaks the sql statement.)   As soon as I add the tablename1.fieldname =
tablename2.fieldname, I get nothing.  As a test, I tried doing a one-table
query using tablename.fieldname.  That comes up empty too whereas the
fieldnames alone work just fine.

The other way to break the sql is to try to use "GROUP BY".  If I create a
one-table query, it's all good until I add "group by".  Then, again the
result is...nothing.

BTW-When I say blank, I mean blank.  I don't even get "Matched" or "Not
Found"

Please!  I desperately need help with this.  Surely SOMEONE has found a way
to do a multi-table query...or maybe it really is a bug?

*ALSO note.  I tried to use the search feature with more than one table.
That doesn't work either.

Thanks so much for your help!!
Jordan
PS-Did I say how much I appreciate your help, IC, even the "pee-poor" docs!
Not only is IC a MAJOR solution for my theater company, but I'm learning
more and more about computing every day.


Donate to the Troubadour Theater Company - without spending a dime!!
Save money on Long Distance, Internet, or cell phone service.  A portion of
the proceeds are donated to Troubadour
http://www.excelir.com/thesavage