-- function Main -- query -- VH SQLQuery query while true do if then q

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
-- function Main()
-- query = ""
-- VH:SQLQuery(query)
i=0
while true do
i=i+1
if i>5 then
i=0
query = "select `nick`,`message` from `messages`"
res, rows = VH:SQLQuery(query)
if res then
for x=0, rows-1 do
local res, nick, message = VH:SQLFetch(x)
VH:SendDataToAll("<"..nick.."> "..message.."|", 1, 10)
end
query = "truncate `messages`"
VH:SQLQuery(query)
end
end
end
-- end