Only showing chat lobby's where Integration field in Database is NULL

Last post 10-05-2005, 8:52 PM by Adam. 1 replies.
Sort Posts: Previous Next
  •  10-05-2005, 12:57 PM 11429

    Only showing chat lobby's where Integration field in Database is NULL

    Hi guys,

    I have got your chat application running well in my app, and I am making use of the open "Integration" column in the chat_lobby table of the database to match chat rooms to sections of my site.

    I do however still have the main chat page which lists all of the chat lobbies available.  I see that the Lobbies are populated to the datalist via a call to

    <code>
    return ChatWebUtility.Api.GetLobbies();
    </code>

    What I was wondering if there is anyway to change the SQL query string called by this function to only select the lobbies where the Integration field is NULL, cause I can't seem to find it in the editable code.  I would imagine that the query would look something like this:

    <code>
    SELECT name, description, announcement, password FROM chat_lobby WHERE integration IS NULL
    </code>

    Any ideas as to how I would achive this?

    Thanks
    Grisbi
  •  10-05-2005, 8:52 PM 11460 in reply to 11429

    Re: Only showing chat lobby's where Integration field in Database is NULL

    Grisbi,
     
    Try the following method:
     
    ArrayList lobbies=new ArrayList();
    foreach(Chat_Lobby eachlobby in ChatWebUtility.Api.GetLobbies())
    {
        if(eachlobby.Integration==null)
        {
            lobbies.Add(eachlobby);
        }
    }
     
    //do your databind here
    ....................


    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML