Menu

Form only inserts one row into DB

Help
saluki
2004-08-10
2004-08-31
  • saluki

    saluki - 2004-08-10

    Hi all!  Great scripting job here...big timesaver. 

    I am having trouble, however.  When I enter the first record into the database, it takes it fine.  After that, I can go back, clear the fields (or not), and submit all I want, but addition records are not added to the database.

    For my primary key, i am using a hidden value in the form that is basically blank and is set to auto-increment when a new record is added.

    PLEASE HELP!  Thank you all so much.  What a great community!

    RG

     
    • Anonymous

      Anonymous - 2004-08-31

      The program automatically creates a line that is used for auto-incrementing when it creates a table for you "id int(10) unsigned NOT NULL auto_increment".  It's the first line in the table.  It is also setup as a Primary Key and you can only have one Primary Key and only one auto-increment in a table. However, you may have multiple Index Keys and Unique Keys. Knowing this,  I see no reason why you should need to go in and create your own auto-increment line, but, can you see how this may be creating problems with your table.

      A hidden value in the form creation is for the capturing of other data like time, date, etc. How are you setting it to auto-increment?

      If you want to know more about creating tables go to  http://dev.mysql.com/doc/mysql/en/CREATE_TABLE.html

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.