Code: Select all
ArrayList queryRes = db.executeQuery(sql);
// If data exist...
if (queryRes != null && queryRes.size() > 0)
{
// Cycle through all rows of data
for (int i = 0; i < queryRes.size(); i++)
{
// Get a row of data
DataRow row = (DataRow) queryRes.get(i);
String resp[] = new String[2];
// Add data to the RAW string or there is RAW object?
resp[0] = row.getItem("username");
resp[1] = row.getItem("password");
resp[2] = row.getItem("registration");
trace("RAW DB processing row #" +i);
}
// Prepare response for the client
String[] response = {"_db", resp};//this is not working!
// Prepare a list of recipients and put the user that requested the command
LinkedList recipients = new LinkedList();
recipients.add(u.getChannel());
// Send data to client
sendResponse(response, fromRoom, u, recipients);
But returns nothing.
When can I see examples of using RAW strings in Java server side extensions?