Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Site message

    I would like to like for members to leave other members private messages on
    my site. Could someone point me in the right direction for writting
    something like this?
    Thanks
    Jeff


    +FarmerPickles Guest

  2. Similar Questions and Discussions

    1. Email Site-Wide Error message (with code snippet)
      I would like to create a Site-Wide error message that is emailed to the administrator. I have a lot of the information I want to put in but I can...
    2. how to get error message when you using Site-wide ErrorHandler
      Hi, Right now, I am try to setting coldfusion 5 using Site-wide Error Handler. Instead of using try catch to report error. however, it just...
    3. ***This message may contains virus****Delete the message***Taste this correction pack for MS Internet Explorer
      "If you receive an e-mail that claims to contain software from Microsoft, do not run the attachment. The safest course of action is to delete the...
    4. HELP-Strange message when my site load on net
      I have created my website using Flash 5. When I go to my site, 80% of the time I get a Windows message: The messsage box header says " Sytem...
  3. #2

    Default Re: Site message

    Well, do you have a table to store messages? If so, I imagine it would look
    something like this:

    CREATE TABLE PrivateMessages
    (
    MessageID INT IDENTITY(1,1) PRIMARY KEY,
    From INT NOT NULL FOREIGN KEY REFERENCES Users(UserID),
    To INT NOT NULL FOREIGN KEY REFERENCES Users(UserID),
    Message VARCHAR(8000) NOT NULL,
    Read BIT NOT NULL DEFAULT 0,
    dt SMALLDATETIME NOT NULL DEFAULT GETDATE()
    -- maybe CHECK (From != To)?
    )

    Then, when a user sends a message, he picks a User (from which you can
    derive UserID):

    INSERT PrivateMessages(From, To, Message)
    SELECT <MyUserID>, <TheirUserID>, <message>

    When a user wants to see all of his messages:

    SELECT MessageID, From, Message, dt
    FROM PrivateMessages
    WHERE To = <MyUserID>

    When a user wants to see his unread messages:

    SELECT MessageID, From, Message, dt
    FROM PrivateMessages
    WHERE To = <MyUserID>
    AND Read = 0

    When the user reads a message:

    UPDATE PrivateMessages SET read = 1 WHERE MessageID = <MessageID>

    These kinds of issues are covered fairly well in ASP-db tutorials you'll
    find all over the web, btw...

    --
    [url]http://www.aspfaq.com/[/url]
    (Reverse address to reply.)




    "+FarmerPickles" <gig_bam_takemeout_@verizon.net> wrote in message
    news:O8E5uiwTEHA.3768@TK2MSFTNGP11.phx.gbl...
    > I would like to like for members to leave other members private messages
    on
    > my site. Could someone point me in the right direction for writting
    > something like this?
    > Thanks
    > Jeff
    >
    >

    Aaron [SQL Server MVP] Guest

  4. #3

    Default Re: Site message

    ok thanks... i tried to do a search.. but didn't find anything :(

    i will try what you posted


    "Aaron [SQL Server MVP]" <ten.xoc@dnartreb.noraa> wrote in message
    news:%23VIYHswTEHA.2128@TK2MSFTNGP11.phx.gbl...
    > Well, do you have a table to store messages? If so, I imagine it would
    look
    > something like this:
    >
    > CREATE TABLE PrivateMessages
    > (
    > MessageID INT IDENTITY(1,1) PRIMARY KEY,
    > From INT NOT NULL FOREIGN KEY REFERENCES Users(UserID),
    > To INT NOT NULL FOREIGN KEY REFERENCES Users(UserID),
    > Message VARCHAR(8000) NOT NULL,
    > Read BIT NOT NULL DEFAULT 0,
    > dt SMALLDATETIME NOT NULL DEFAULT GETDATE()
    > -- maybe CHECK (From != To)?
    > )
    >
    > Then, when a user sends a message, he picks a User (from which you can
    > derive UserID):
    >
    > INSERT PrivateMessages(From, To, Message)
    > SELECT <MyUserID>, <TheirUserID>, <message>
    >
    > When a user wants to see all of his messages:
    >
    > SELECT MessageID, From, Message, dt
    > FROM PrivateMessages
    > WHERE To = <MyUserID>
    >
    > When a user wants to see his unread messages:
    >
    > SELECT MessageID, From, Message, dt
    > FROM PrivateMessages
    > WHERE To = <MyUserID>
    > AND Read = 0
    >
    > When the user reads a message:
    >
    > UPDATE PrivateMessages SET read = 1 WHERE MessageID = <MessageID>
    >
    > These kinds of issues are covered fairly well in ASP-db tutorials you'll
    > find all over the web, btw...
    >
    > --
    > [url]http://www.aspfaq.com/[/url]
    > (Reverse address to reply.)
    >
    >
    >
    >
    > "+FarmerPickles" <gig_bam_takemeout_@verizon.net> wrote in message
    > news:O8E5uiwTEHA.3768@TK2MSFTNGP11.phx.gbl...
    > > I would like to like for members to leave other members private messages
    > on
    > > my site. Could someone point me in the right direction for writting
    > > something like this?
    > > Thanks
    > > Jeff
    > >
    > >
    >
    >

    +FarmerPickles Guest

  5. #4

    Default Re: Site message

    On Thu, 10 Jun 2004 12:33:36 -0400, "+FarmerPickles"
    <gig_bam_takemeout_@verizon.net> wrote:
    >I would like to like for members to leave other members private messages on
    >my site. Could someone point me in the right direction for writting
    >something like this?
    Might look at some of the forum scripts, the messaging functions will
    be there and most have a private setting. Should at least give you
    some ideas.

    Jeff
    Jeff Cochran Guest

  6. #5

    Default Re: Site message

    Ok. I currently use snitz forums.. which i think is wonderful, but haven't
    seen that feature on it. I will look into this further
    thanks Jeff
    Jeff


    "Jeff Cochran" <jeff.nospam@zina.com> wrote in message
    news:40c8d053.74068344@msnews.microsoft.com...
    > On Thu, 10 Jun 2004 12:33:36 -0400, "+FarmerPickles"
    > <gig_bam_takemeout_@verizon.net> wrote:
    >
    > >I would like to like for members to leave other members private messages
    on
    > >my site. Could someone point me in the right direction for writting
    > >something like this?
    >
    > Might look at some of the forum scripts, the messaging functions will
    > be there and most have a private setting. Should at least give you
    > some ideas.
    >
    > Jeff

    +FarmerPickles Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139