[ic] query sql

Kevin Walsh interchange-users@icdevgroup.org
Thu Dec 19 01:46:00 2002


Frank [fmueller@adva.de] wrote:
> 
> Now I got the problem that I need to search a substring
> and then I have to sort the results.
> 
> The [loop search .....] syntax I use is:
> 
> [loop search="se=dmd/sf=rub/su=yes/tf=rub/ml=15"]
> ...
> [/loop]
> 
> Is there any equivalent [query sql ....] tag for that???
> 
> I had no change with what I was trying:
> 
> [query sql = "SELECT code, thumb, ab_price, product 
>               FROM products 
>               WHERE rub LIKE 'dmd%'"
>               type=list
>               ml=15 ]
> [list]
> ...
> [/list]
> [/query]
> 
> Any ideas for doing better??
> How can I sort the result??
> 
Try an "ORDER BY" clause in your SQL query.

-- 
   _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
  _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
 _/ _/    _/          _/ _/     _/    _/  _/_/    kevin@cursor.biz
_/   _/  _/_/_/_/      _/    _/_/_/  _/    _/