Updating a single field..

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nathanwb
    New Member
    • Mar 2008
    • 39

    Updating a single field..

    I have a small app that allows users to send messages back and forth to each other. I have a place that shows there messages and they can click on a message to read. I have a field in the table called "isread" this defaults to 0 when someone enters a new field and its directed to another user. This is a way that I can show the new message is new and unread.

    What I would like to do is when a user clicks on one of his/her messages it would update that single field to 1 and im not sure how to go about that..

    Here is the coad that I am using to read the message..

    [php]
    $qinfo = mysql_query("SE LECT * FROM `email` WHERE `email_id`='$id '");
    if (mysql_num_rows ($qinfo)==0) die("");
    $row = mysql_fetch_ass oc($qinfo);
    extract($row);
    [/php]

    Thanks
  • nathanwb
    New Member
    • Mar 2008
    • 39

    #2
    Originally posted by nathanwb
    I have a small app that allows users to send messages back and forth to each other. I have a place that shows there messages and they can click on a message to read. I have a field in the table called "isread" this defaults to 0 when someone enters a new field and its directed to another user. This is a way that I can show the new message is new and unread.

    What I would like to do is when a user clicks on one of his/her messages it would update that single field to 1 and im not sure how to go about that..

    Here is the coad that I am using to read the message..

    [php]
    $qinfo = mysql_query("SE LECT * FROM `email` WHERE `email_id`='$id '");
    if (mysql_num_rows ($qinfo)==0) die("");
    $row = mysql_fetch_ass oc($qinfo);
    extract($row);
    [/php]

    Thanks

    I was able to figure this out.. Thanks

    Comment

    Working...