Private Sub SendUserMessages(id As String, pb As PushB4A)
PSQL = Main.Pool.GetConnection
Dim table As List = DBUtils.ExecuteMemoryTable(PSQL, _
"SELECT messages_d.id_msg, message FROM messages_q, messages_d WHERE messages_q.id_msg = messages_d.id_msg AND id_device = ?", _
Array As String(id), 0)
PSQL.Close
If table.Size > 0 Then
Dim msgs As List
msgs.Initialize
For Each row() As String In table
msgs.Add(row(0))
msgs.Add(row(1))
Next
CallSubDelayed2(pb, "SendMessages", msgs)
End If
End Sub