This topic is locked

Auto Increment Issue

5/27/2005 10:27:29 AM
PHPRunner General questions
pplaut author

Hey,
As in another post, I am creating a script and for the first time populating it with data.
Field definition in the script
`clubmouse_id` int(11) NOT NULL auto_increment,

PRIMARY KEY (`clubmouse_id`)
Populate portion of the script
INSERT INTO mos_clubmouse (

clubmouse_id

)
VALUES (

'100');
When I go to add an new record i get a duplicate value error. Again I don't think I was having this problem until I started using scripts to populate the data.

This is the first record in the table and if I manually open the table and insert a record it goes to the next record ok, 101.
PHP properties are set as number for view.

It is checked to show up on the add page, but no field shows up.

The title does not the field though.
Here is the error:
Error type 256

Error description Duplicate entry '100' for key 1

URL development.techsgroup.com/_clubmouse/_basic/mos_clubmouse_add.php

Error file C:\Inetpub\wwwroot\techsgroup\development\_clubmouse\_basic\include\dbconnection.php

Error line 26
insert into `mos_clubmouse` (`member_first_name`, `member_spouse_first`, `member_last_name`, `member_salutation`, `home_phone`, `cell_phone`, `fax_phone`, `work_phone`, `work_phone_ext`, `primary_email`, `primary_web_address`, `address_one`, `address_two`, `address_city`, `address_state`, `address_zip`, `member_since`, `renewal_date`, `club_position`, `member_status`, `viewable_online`, `printable`, `member_userid`, `clubmouse_id`) values ('Peer', '', 'Plaut', '', '', '', '', '', '', '', '', '', '', '', '', '', '2005-5-27', '2006-5-27', 'Member', 'Active', 'Yes', 'Yes', '', 100)
I don't see anything in the db connection info.
Thanks

Peer

Sergey Kornilov admin 5/30/2005

Peer,
remove clubmouse_id field from Add page on Formatting tab in PHPRunner.

pplaut author 5/31/2005

Somewhere between upgrading, getting the ftp issues worked out and following your advice.

It worked YIPEE!!!!

Thanks

Peer