SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: SignUp problem.

  1. #1
    SitePoint Enthusiast konsama's Avatar
    Join Date
    Jun 2007
    Location
    Sweden
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    SignUp problem.

    Firefox Error message:
    Notice: Query failed: Duplicate entry 'vsuser01a' for key 3 SQL: INSERT INTO signup SET login='vsuser01a', password='d8578edf8458ce06fbc5bb76a58c5ca4', email='vsuser01@hotmail.com', firstName='Vicky', lastName='Smith', signature='', confirm_code='6433debf229dd3a8b4839e2c5da8baeb', created='1188052640' in /var/www/sp/login/MySQL.php on line 113
    There was an error creating your account.
    Please try again later or contact the site administrators
    MySQL.php:
    /**
    * Returns an instance of MySQLResult to fetch rows with
    * @param $sql string the database query to run
    * @return MySQLResult
    * @access public
    */
    function & query($sql) {
    if (!$queryResource=mysql_query($sql,$this->dbConn))
    trigger_error ('Query failed: '.mysql_error($this->dbConn).
    ' SQL: '.$sql); ........LINE 113
    return new MySQLResult($this,$queryResource);
    }
    I'm using class files built by Harry Fuecks and following his books. As far as I know the Firefox error says that it can't create the account because it already exists in MySQL database. The account got in there previously because my mail INFO was incorrect so nothing got sent but it seems like something got stored and now I can't re-signup this user.

    Could someone fill in what I'm missing beside this. I don't know what that MySQL code really mean? And what exactly the problems are.

  2. #2
    SitePoint Enthusiast konsama's Avatar
    Join Date
    Jun 2007
    Location
    Sweden
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I went into MySQL Query Browser and did
    Code:
    DELETE FROM signup
    WHERE signup_id='3';
    in order to clear the double account issue.

    But I'm still confused why the class file didn't take care of the double account error more properly without creating that revealing Firefox error message?
    Maybe there isn't any codes to capture that error or have I connected things wrong

    Code:
    /**
    * Returns an instance of MySQLResult to fetch rows with
    * @param $sql string the database query to run
    * @return MySQLResult
    * @access public
    */
    function & query($sql) {
    if (!$queryResource=mysql_query($sql,$this->dbConn))
    trigger_error ('Query failed: '.mysql_error($this->dbConn).
    ' SQL: '.$sql); ........LINE 113
    return new MySQLResult($this,$queryResource);
    }


Bookmarks

Posting Permissions

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