proc pub_query { nick host ident chan arg } {
putlog "in #chan $nick used !query $arg"                                     
foreach info [sql "SELECT * FROM table WHERE name like '\%[lindex $arg 0]\%' ORDER BY date DESC"] {
}
putquick "PRIVMSG #chan:(sqlbot) found [sql numrows] matches to $arg"
} 