04092005 1213 GMT-6
I have this function that updates a page log. To my eyes, its just like 
another function I have that creates user accounts. I have added the "if 
( $status" because its returning yes but the db is unaffected.

I have four fields, date being a time stamp. So its returning $acc_state 
= 4yes every time but the db isnt showing a thing.

function fn_updateAccessLog($userid, $appid, $page) {
        include ('db.php');

        $sql = "INSERT INTO accesslog (userid,appid,page) VALUES (";
            $sql.="'".$userid."'";
            $sql.="'".$appid."'";
            $sql.="'".$page."')";
        mysql_query($sql, $connection);

        $status = mysql_affected_rows($connection);

        mysql_close($connection);

        if ($status == 3) {
            $acc_state = "3yes";
            return $acc_state;
        }
        else if ($status = 4) {
            $acc_state = "4yes";
            return $acc_state;
        }
        else {
            $acc_state = "no";
            return $acc_state;
        }
}


[Non-text portions of this message have been removed]



Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to