[ic] query tag usage
Interchange Fan
interchange-users@icdevgroup.org
Mon Jun 9 17:10:01 2003
> > I'm trying to do use the query tag in IC 4.9.7 to pull some
> data from a
> > MySQL 4.1 database, and haven't gotten too far. The following code:
> >
> > ----------------------------------------
> > [query
> > sql="select * FROM nc_authorarticle
> where articleID = '31'"
> > type=list
> > list=1
> > more=1
> > ml=100
> > st=db
> > ]
> > [on_match]
> > Match:[sql-field authorDisplay] [sql-field articleID]
> > [sql-field authorship]<br>
> > [/on_match]
> > [/query]
>
> [query
> sql="select * FROM nc_authorarticle where
> articleID = '31'"
> type=list
> list=1
--snip this--
> more=1
> ml=100
--and this--
> st=db
> ]
> [on_match]
> Got a match
> [/on_match]
> [list]
> Match:[sql-param authorDisplay] [sql-param articleID]
> [sql-param authorship]<br>
> [/list]
> [/query]
>
> As you have a more=1, you probably want a [more] [/more]
> section as well.
Ah, sorry. I did have a more, but deleted that to try to simplify
things. I wouldn't really need a more in this case, so let's pretend
it's not there. :)
Peter