Welcome to Geeklog, Anonymous Sunday, October 06 2024 @ 07:38 am EDT

Geeklog Forums

1062: Duplicate entry '0' for key 1. SQL in question


Status: offline

nobese

Forum User
Chatty
Registered: 01/20/06
Posts: 44
when a new user sign in system says:


- 1062: Duplicate entry '0' for key 1. SQL in question: INSERT INTO gl_users (username,email,regdate,cookietimeout) VALUES ('tugce','oktaytu@gmail.com','2006-08-06 21:55:15','28800')


how can ı solve it?

ı have 160 users but why ıt wants to entry to '0'
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
From a quick Google search, I get the impression that this error is related to the auto_increment attribute. Make sure that in your gl_users table, the "uid" field still has auto_increment attribute. You can check that in phpMyAdmin.

bye, Dirk
 Quote

Status: offline

nobese

Forum User
Chatty
Registered: 01/20/06
Posts: 44
hi


that problem begin the when ı install imagegallery to mu geeklog site.

now my gl_users table has

PRIMARY PRIMARY 161 uid
LOGIN INDEX 161 uid passwd username


ıt says there is only one uid name


which one is must be delete ı dont know

 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
You shouldn't delete anything. Just make sure the 'uid' field still has "auto_increment" listed in its "Extra" column.

bye, Dirk
 Quote

Status: offline

nobese

Forum User
Chatty
Registered: 01/20/06
Posts: 44
#1067 - Invalid default value for 'uid'
 Quote

Status: offline

nobese

Forum User
Chatty
Registered: 01/20/06
Posts: 44
ı delete LOGIN INDEX 161 uid passwd username

and happy endSmile


thanks
 Quote

nobese

Anonymous
but when ı add new user no problem

but more than 1 user addıng dosnt work and it says squel error



but database even have more than 160 users when add new user ıt put uıd to 0

not going on from 160
 Quote

Status: offline

nobese

Forum User
Chatty
Registered: 01/20/06
Posts: 44
but when ı add new user no problem

but more than 1 user addıng dosnt work and it says squel error



but database even have more than 160 users when add new user ıt put uıd to 0

not going on from 160
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
At the risk of repeating myself: Make sure the "uid" field in your gl_users table still has the "auto_increment" attribute:
Text Formatted Code
uid mediumint(8) NOT NULL auto_increment,
 

bye, Dirk
 Quote

Status: offline

nobese

Forum User
Chatty
Registered: 01/20/06
Posts: 44
ı try but:


#1067 - Invalid default value for 'uid'
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Sounds like you're trying to change the wrong thing. "auto_increment" is not a default value. In phpAdmin, it's actually the next column after the default value, labelled "Extra".

Compare it with some other table that has auto_increment entries. The "bid" field in gl_blocks, for example.

bye, Dirk
 Quote

Status: offline

nobese

Forum User
Chatty
Registered: 01/20/06
Posts: 44
ı try to change you say but ıt couldnt



is it the normallly below?

PRIMARY PRIMARY 161 uid
LOGIN INDEX uid
passwd
username
users_username INDEX username
users_fullname INDEX fullname
users_email INDEX email
users_passwd INDEX passwd
users_pwrequestid INDEX pwrequestid
 Quote

Status: offline

nobese

Forum User
Chatty
Registered: 01/20/06
Posts: 44
himm

ı delete default uid number from gl_users and ı think ıt will no problem anymore
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
I don't think it will be "no problem" (in other words: I think you will still have problems).

But I think we have a communication problem. Maybe someone else can explain things better ...

bye, Dirk
 Quote

Status: offline

nobese

Forum User
Chatty
Registered: 01/20/06
Posts: 44
Rolling Eyes

ıts menaing:

now no problem

but tomorrow: who knows Wink
 Quote

All times are EDT. The time is now 07:38 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content