5
I’m having a problem, I’m not really sure if it’s in PHP or in the database.
In a posting system using PHP, as soon as you post a news, the ID
(the key Primary, which would be used so: index.php?ID=0
) is not changing, that is, it always starts in the 0
and I wanted it to start from the 1
, and when I create a post ends up giving the following error:
Duplicate entry '0' for key 'PRIMARY'"
and then I always have to change in Mysql to another ID
.
Code: http://pastebin.com/raw.php?i=0dQEW0n1
It would have to be put in a sequential way?
Glue the database too... The problem is there!
– Sr. André Baill
That means you’re trying to insert another record with
ID=0
. You got theID
as auto increment?– Jorge B.