Okay, I have done that now. It works perfectly!
BUT: Only server sided it loops because look:
--SERVER:
local getSiteInfoDatabase = mysql_query( connect_mysql, "SELECT * FROM `messages` WHERE `to`='" .. userName .. "' " )
if (getSiteInfoDatabase) then
local numRows = mysql_num_rows(getSiteInfoDatabase)
if (numRows >= 1) then
while true do
local row = mysql_fetch_assoc(getSiteInfoDatabase)
if (not row) then break end
outputChatBox(row['title'])
subject = row['title']
end
else
return nil
end
end
Now what I do is make a var off the row['title] in subject.
triggerClientEvent( theUser, "openTheUserPanel", getRootElement(), loginName, class, serial, skin, countMessage, unReadMessage, subject )
Im sending that too my clientsided GUI!
GUI:
pmList = guiCreateGridList ( 0.03, 0.21, 0.93, 0.24, true, mainWindowUserPM )
pmColumn1 = guiGridListAddColumn( pmList, "Subject", 0.31 )
pmColumn2 = guiGridListAddColumn( pmList, "From", 0.31 )
pmColumn3 = guiGridListAddColumn( pmList, "Date", 0.31 )
pmRow = guiGridListAddRow( pmList )
guiGridListSetItemText( pmList, pmRow, pmColumn1, subject, false, false )
Still, it only displays one item in the gridlist whilst I have more items to be dsiplayed!