PHP Login System with Admin Features

This forum was created to talk about the PHP Login System with admin features created by jpmaster77 on evolt's website


    Error: Duplicate entry '' for key 'PRIMARY' ????

    Share
    avatar
    Linchpin311

    Number of posts : 220
    Age : 32
    Localisation : Long Island
    Registration date : 2007-05-14

    Re: Error: Duplicate entry '' for key 'PRIMARY' ????

    Post  Linchpin311 on Fri Jun 18, 2010 7:52 pm

    A primary key is a unique identifier for each row that is entered into the database. If you are getting that error is means you are attempting to add a new row into the database with a primary key that already exists.

    Well you had to make some changes to the script to get this error so I'm wondering what your primary key is set as now. Traditionally primary keys default as NULL and auto increment (meaning your key will be a number, the first rows key will be 0 and it will automatically add an increment one 1 for each additional entry), so its rare to receive this problem so I'm guessing you changed your primary key at some point.

    Also I would check the line of code that adds a new row to the database. That line could hold a clue to solving your problems.


    _________________
    in the end, the universe tends to unfold as it should...

    Also note that it is your responsibility to die() if necessary.

      Current date/time is Tue Sep 19, 2017 9:29 am