[Solved] Please read(help with myphpam)

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Slim~keith
Registered User
Posts: 59
Joined: Tue Oct 15, 2002 3:10 pm
Contact:

[Solved] Please read(help with myphpam)

Post by Slim~keith »

Error

SQL-query :

ALTER TABLE `phpbb_groups` CHANGE `group_id` `group_id` MEDIUMINT( 8 ) DEFAULT '0' NOT NULL AUTO_INCREMENT

MySQL said:


Duplicate entry '297' for key 1
Back



i'm getting this error when i try to change group_id file to AUTO_INCREMENT because i read many place's on this forum that will fix the error i have
Could not insert data into groups table

DEBUG MODE

SQL Error : 1062 Duplicate entry '0' for key 1

INSERT INTO phpbb_groups (group_name, group_description, group_single_user, group_moderator) VALUES ('', 'Personal User', 1, 0)

Line : 524
File : d:\www\stranke\forbodybuilders.com\forum\includes\usercp_register.php



i tryed running this script with no luck all i got was an error again
<?php
define('IN_PHPBB', true);
$phpbb_root_path = './';
include_once $phpbb_root_path . 'extension.inc';
include_once $phpbb_root_path . 'config.' . $phpEx;
include_once $phpbb_root_path . 'includes/constants.' . $phpEx;
include_once $phpbb_root_path . 'includes/db.' . $phpEx;

$sql='ALTER TABLE ' . GROUPS_TABLE . ' CHANGE `group_id` `group_id` MEDIUMINT(8) NOT NULL AUTO_INCREMENT';
if (!$db->sql_query($sql))
{
echo 'Oops! There was an error! :(<br/><br/>';
$error = $db->sql_error();
echo $error['message'];
}
else
{
echo 'All went swimmingly! :)';
}
?>
Slim~keith
Registered User
Posts: 59
Joined: Tue Oct 15, 2002 3:10 pm
Contact:

Post by Slim~keith »

man (russainGIRL) why didn't i think of that if that is what it take's to get a reply on this board :roll:
R45
Registered User
Posts: 2830
Joined: Tue Nov 27, 2001 10:42 pm

Post by R45 »

huh? Patience is a virtue. This is an opensource effort, there is no commercial backing. People help you here out of the kindness of their heart.

Regardless, you'll need to look for the duplicated "297" id row and delete on. You cannot auto_increment a column that has duplicate values. Manually delete one of the rows (which may intern mess up that user but cross your fingers) and try again.
Slim~keith
Registered User
Posts: 59
Joined: Tue Oct 15, 2002 3:10 pm
Contact:

Post by Slim~keith »

Thank you, Not that i was to upset! i just was thinking it was funny she got 8 replys in about 1 hour smart 8O

OK back to the task at hand. is this the field?
Edit Delete 296 1 Personal User 0


i just delete?
R45
Registered User
Posts: 2830
Joined: Tue Nov 27, 2001 10:42 pm

Post by R45 »

Is there a 297?

Try this query

Code: Select all

DELETE FROM phpbb_groups WHERE group_id = 297 LIMIT 1
Slim~keith
Registered User
Posts: 59
Joined: Tue Oct 15, 2002 3:10 pm
Contact:

Post by Slim~keith »

Very sorry i new to myphpam. but learning!

How do i run the query? i'm thinking goto the SQL tab then it gives me a box to put the Query in the box and push what i just don't see where to run it.

Also, i see where there is "Run SQL query/queries on database" but it is black and you can't push it!
Last edited by Slim~keith on Sat Nov 30, 2002 4:49 am, edited 1 time in total.
R45
Registered User
Posts: 2830
Joined: Tue Nov 27, 2001 10:42 pm

Post by R45 »

Isn't there an execute button under the box?
Slim~keith
Registered User
Posts: 59
Joined: Tue Oct 15, 2002 3:10 pm
Contact:

Post by Slim~keith »

this is what i'm looking at.
--------------------------------------------------------------

Run SQL query/queries on database forbodybuilders [Documentation]

Fields: group_id group_type group_name

group_description group_moderator group_single_user

DELETE FROM phpbb_groups WHERE group_id = 297 LIMIT 1

Show this query here again

Or Location of the textfile :




Insert data from a textfile into table
R45
Registered User
Posts: 2830
Joined: Tue Nov 27, 2001 10:42 pm

Post by R45 »

There is a button above "Insert data from a textfile into table" no?
User avatar
ErDrRon
Registered User
Posts: 2156
Joined: Sat Jun 22, 2002 7:18 pm
Location: Colorado, USA
Contact:

Post by ErDrRon »

Slim~keith wrote: Very sorry i new to myphpam. but learning!

How do i run the query? i'm thinking goto the SQL tab then it gives me a box to put the Query in the box and push what i just don't see where to run it.

Also, i see where there is "Run SQL query/queries on database" but it is black and you can't push it!


What is myphpam?? Are you referring to phpMyAdmin?

Cheers!
Ron
:D
Last edited by ErDrRon on Sat Nov 30, 2002 5:05 am, edited 1 time in total.
ErDrRon (Yes, I really am an ER Doc) ;-)

Author of the Admin Voting, Retroactive Signature and Edit Post Date MODs. [Unofficial MODs, of course]
Visit my phpBB Support Forum with over 90 installed MODs.
Get inexpensive yet great webhosting at PokedYou.com.
powderface
Registered User
Posts: 1
Joined: Sat Nov 30, 2002 4:59 am

Post by powderface »

hehehehe
Go Big
Slim~keith
Registered User
Posts: 59
Joined: Tue Oct 15, 2002 3:10 pm
Contact:

Post by Slim~keith »

OK, OK, i was looking for execute, run, start quary, but it is go and i was thinking that for some thimg else :?

i did it and i'm going to go check it out now. 8)
Slim~keith
Registered User
Posts: 59
Joined: Tue Oct 15, 2002 3:10 pm
Contact:

Post by Slim~keith »

ErDrRon wrote:
Slim~keith wrote:Very sorry i new to myphpam. but learning!

How do i run the query? i'm thinking goto the SQL tab then it gives me a box to put the Query in the box and push what i just don't see where to run it.

Also, i see where there is "Run SQL query/queries on database" but it is black and you can't push it!


What is myphpam?? Are you referring to phpMyAdmin?

Cheers!
Ron
:D

haha, i was just rushing throw this so i would not waste his time :roll:
Slim~keith
Registered User
Posts: 59
Joined: Tue Oct 15, 2002 3:10 pm
Contact:

Post by Slim~keith »

ok, i run that query and it said it deleted "row 1" but when i just tested the furom i still get the same error

Could not insert data into groups table

DEBUG MODE

SQL Error : 1062 Duplicate entry '0' for key 1

INSERT INTO phpbb_groups (group_name, group_description, group_single_user, group_moderator) VALUES ('', 'Personal User', 1, 0)

Line : 524
File : d:\www\stranke\*********.com\forum\includes\usercp_register.php
Slim~keith
Registered User
Posts: 59
Joined: Tue Oct 15, 2002 3:10 pm
Contact:

Post by Slim~keith »

YES, Thank you! i did it... so far it is fixxed i had to run that file again to fix the table. after i ran the query. all cleared up :D

Thank you! R45, for your many reply's :wink:
Locked

Return to “2.0.x Support Forum”