selecthonks:="select honks.honkid, honks.userid, username, what, honker, oonker, honks.xid, rid, dt, url, audience, noise, precis, format, convoy, whofore, flags from honks join users on honks.userid = users.userid "
limit:=" order by honks.honkid desc limit 250"
smalllimit:=" order by honks.honkid desc limit ?"
butnotthose:=" and convoy not in (select name from zonkers where userid = ? and wherefore = 'zonvoy' order by zonkerid desc limit 100)"
stmtOneXonk=preparetodie(db,selecthonks+"where honks.userid = ? and xid = ?")
stmtAnyXonk=preparetodie(db,selecthonks+"where xid = ? order by honks.honkid asc")
stmtOneBonk=preparetodie(db,selecthonks+"where honks.userid = ? and xid = ? and what = 'bonk' and whofore = 2")
stmtPublicHonks=preparetodie(db,selecthonks+"where whofore = 2 and dt > ?"+limit)
stmtEventHonks=preparetodie(db,selecthonks+"where (whofore = 2 or honks.userid = ?) and what = 'event'"+limit)
stmtUserHonks=preparetodie(db,selecthonks+"where honks.honkid > ? and (whofore = 2 or whofore = ?) and username = ? and dt > ?"+limit)
stmtPublicHonks=preparetodie(db,selecthonks+"where whofore = 2 and dt > ?"+smalllimit)
stmtEventHonks=preparetodie(db,selecthonks+"where (whofore = 2 or honks.userid = ?) and what = 'event'"+smalllimit)
stmtUserHonks=preparetodie(db,selecthonks+"where honks.honkid > ? and (whofore = 2 or whofore = ?) and username = ? and dt > ?"+smalllimit)
myhonkers:=" and honker in (select xid from honkers where userid = ? and (flavor = 'sub' or flavor = 'peep' or flavor = 'presub') and combos not like '% - %')"
stmtHonksForUser=preparetodie(db,selecthonks+"where honks.honkid > ? and honks.userid = ? and dt > ?"+myhonkers+butnotthose+limit)
stmtHonksForUserFirstClass=preparetodie(db,selecthonks+"where honks.honkid > ? and honks.userid = ? and dt > ? and (what <> 'tonk')"+myhonkers+butnotthose+limit)