help with getting my room count to show correctly!
Posted: Fri 23 Jan 2009 21:02
ok i finaly worked out how to get each selected room but now i have a problem when i try to add the room count to the client it sends the room count as one big number like 1123 and not for each lobby
IE
LOBBY 1 - 3 ROOMS
LOBBY 2 - 1 ROOMS
LOBBY 3 - 50 ROOMS
the way it looks right now is as follows
LOBBY 1 - 3150
LOBBY 2 - 3150
LOBBY 3 - 3150
can anyone help me please thanks P.S my sql is not best so demos would be helpful ...
thanks
IE
LOBBY 1 - 3 ROOMS
LOBBY 2 - 1 ROOMS
LOBBY 3 - 50 ROOMS
the way it looks right now is as follows
LOBBY 1 - 3150
LOBBY 2 - 3150
LOBBY 3 - 3150
can anyone help me please thanks P.S my sql is not best so demos would be helpful ...
Code: Select all
MyQuery.SQL.Text := 'SELECT count(*),groups.name,groups.n FROM groups,rooms WHERE groups.n=rooms.id GROUP BY name';
MyQuery.Execute;
while not MyQuery.Eof do begin
MyQuery.Next;
end;
s := s + 'šRGetGroupsœ'
+ GroupsTable.FieldByName('Name').AsString +'œ' //
+ IntToStr(n) +'œ'
+ GroupsTable.FieldByName('LobbyRate').AsString +'œ'
+ h +'œ'
+ MyQuery.Fields[0].AsString +'œ' // room count
+ k +'œ';