This topic is locked
[SOLVED]

 Auto Increment Primary Key not generated

7/11/2005 5:15:32 AM
PHPRunner General questions
jpedwardspost author

Hi,

I have a table where the primary key field item_id is an auto-incrementing number field in mysql.
I have generated a form for this table using php runner.
When I use the phprunner form to 'Add a new Record' the primary key field (item_id) is obviously displayed as a 'Required field *'.
The problem arises when I try to insert a new record because I have to manually find out what the last incremented value for the field was and manually enter it. If I try and insert a new record without putting any value in this field (in the hope that it will be automagically done behind the scenes) I get the error message 'The following fields are required - item_id'.
Any ideas how to get around this one?
Cheers,

JP.
PS - So far Phprunner is evaluating as a fab RAD tool.

jpedwardspost author 7/11/2005

OK,
after I posted I searched the forum (again) and discovered this topic has come up before in the topic entitled "Auto Increment Issue".
Tried the fix admin suggested for that which was to remove the auto-incrementing primary key field from the ADD PAGE in the FORMAT TAB and regenerated and everything is now great.
Sorry to have bothered.
Cheers,

JP.