[ic] [query] tag has me dazed and confused

Pann McCuaig interchange-users@interchange.redhat.com
Wed Aug 29 15:04:00 2001


--3MwIy2ne0vdjdPXF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

That works! See two attached files (and then tell me why, please).

And here is the log entry:

010829 15:00:25      87 Connect    ratbert@localhost on tpe08
                     87 Query      select * from products
                     87 Query      select * from products
                     87 Query      SELECT  *
         FROM    products
         ;
                     87 Quit

And note that one of the "select * from products" entries is from the
loop search (which is working) and the other if from the [query] try,
which is not.

On Wed, Aug 29, 2001 at 11:12, Dan Browning wrote:
> At 01:57 PM 8/29/2001 -0400, you wrote:
> >On Wed, Aug 29, 2001 at 10:14, Dan Browning wrote:
> > > At 12:59 PM 8/29/2001 -0400, you wrote:
> > > >On Wed, Aug 29, 2001 at 17:00, Jonathan Clark wrote:
> > > > >
> > > > > > When I access a page that consists of the following:
> > > > > > ---------------------------------------------------
> > > > > > <p>Testing sql query<br>
> > > > > > [query sql="select * from products"]
> > > > > > Result: [sql-code]<br>
> > > > > > [/query]
> > > > > >
> > > > > > <p>Testing loop<br>
> > > > > > [loop search="ra=yes/fi=products"]
> > > > > >  [loop-code]<br>
> > > > > > [/loop]
> > > > > > ---------------------------------------------------
> > > > >
> > > > > How about this scenario:
> > > > >
> > > > >   using SQL db eg. MySQL.
> > > > >   list of items in products.txt
> > > > >   All items deleted from the SQL table?
> > > >
> > > >$ mysql tpe08 -e 'select sku from products'
> > > >
> > > >sku
> > > >4600-HO
> > > >B2040035
> > > >30-10005
> > > >7901
> > > >PP-815
> > > >10-10004
> > > >10-10012
> > > >2067
> > > >30-10004
> > > >10-10005
> > > >30-10006
> > > >30-10011
> > > >C14000
> > > >C14000AT
> > > >C14024
> > > >C14025
> > > >C14099
> > > >C15000
> > > >C20000
> > > >C20002
> > > >00067
> > > >
> > > > > your [loop] tag list is using the products.txt without st=db?
> > > >
> > > >Nope, that ain't it.  :-(
> > > >
> > > >Cheers,
> > > >  Pann
> > >
> > > Turn on your MySQL logging and see what's actually getting passed to the
> > > database.  Also, try [sql-param sku] instead of [sql-code] just to see if
> > > it helps.  HAND,
> >
> >010829 13:54:14      77 Connect    ratbert@localhost on tpe08
> >                      77 Query      select * from products
> >                      77 Quit
> >
> >Looks fine to me?
> >
> >And [sql-param sku] changes nothing.  :-(
> >
> >Cheers,
> >  Pann
> 
> And nothing in the error logs either?
> 
> I'm sure it's something really simple staring us in the face.
> 
> How about trying a list-style for your query:
> 
> [query prefix=test list=1 type=list sql=|
>          SELECT  *
>          FROM    products
>          ; | ]
>          [no_match]
>                  No matches<BR>
>          [/no_match]
>          [on_match]
>                  Match!<BR>
>          [/on_match]
>          [list]
>                  [test-param sku]
>          [/list]
> [/query]
> 
> HTH,
> 
> Dan Browning <danpb@mail.com>
> 
> _______________________________________________
> interchange-users mailing list
> interchange-users@interchange.redhat.com
> http://interchange.redhat.com/mailman/listinfo/interchange-users
> 

-- 
geek by nature, Linux by choice                     L I N U X       .~.
                                                    The Choice      /V\
http://www.ourmanpann.com/linux/                     of a GNU      /( )\
                                                    Generation     ^^-^^

--3MwIy2ne0vdjdPXF
Content-Type: text/html; charset=us-ascii
Content-Disposition: attachment; filename="testing.html"

<p>Testing sql query<br>
[query sql="select * from products"]
Result: [sql-code]<br>
[sql-param sku]<br>
[/query]

<p>Testing loop<br>
[loop search="ra=yes/fi=products/st=db"]
 [loop-code]<br>
[/loop]

<p>Testing Dan Browning<br>
[query prefix=test list=1 type=list sql=|
         SELECT  *
         FROM    products
         ; | ]
         [no_match]
                 No matches<BR>
         [/no_match]
         [on_match]
                 Match!<BR>
         [/on_match]
         [list]
                 [test-param sku]<br>
         [/list]
[/query]


--3MwIy2ne0vdjdPXF
Content-Type: text/html; charset=us-ascii
Content-Disposition: attachment; filename="db_result.html"

<p>Testing sql query<br>


<p>Testing loop<br>

 4600-HO<br>

 B2040035<br>

 30-10005<br>

 7901<br>

 PP-815<br>

 10-10004<br>

 10-10012<br>

 2067<br>

 30-10004<br>

 10-10005<br>

 30-10006<br>

 30-10011<br>

 C14000<br>

 C14000AT<br>

 C14024<br>

 C14025<br>

 C14099<br>

 C15000<br>

 C20000<br>

 C20002<br>

 00067<br>


<p>Testing Dan Browning<br>

         
         
                 Match!<BR>
         
         
                 4600-HO<br>
         
                 B2040035<br>
         
                 30-10005<br>
         
                 7901<br>
         
                 PP-815<br>
         
                 10-10004<br>
         
                 10-10012<br>
         
                 2067<br>
         
                 30-10004<br>
         
                 10-10005<br>
         
                 30-10006<br>
         
                 30-10011<br>
         
                 C14000<br>
         
                 C14000AT<br>
         
                 C14024<br>
         
                 C14025<br>
         
                 C14099<br>
         
                 C15000<br>
         
                 C20000<br>
         
                 C20002<br>
         
                 00067<br>
         



--3MwIy2ne0vdjdPXF--