Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Spot the problem

Options
  • 03-12-2001 9:17pm
    #1
    Closed Accounts Posts: 2,682 ✭✭✭


    Thanks for the help jmcc.


Comments

  • Registered Users Posts: 7,410 ✭✭✭jmcc


    The ID may be an auto incrementing value rather than one that is set by the user. You'd have to look at the schema, in particular the CREATE ID section. It may look like this:

    CREATE TABLE prod (id INT NOT NULL AUTO_INCREMENT,


    You are also specifying the ID number as being 1 in the php code below so this value would never change. Anything getting entered into the admin form would have ID=1.

    The ID number and CodeID are different. If the ID is an auto incrementing field (basically a number that is unique for each record and increments by one each time) then you would not specify that in the php.

    eg INSERT INTO prod (FileName, FileSize, ....) VALUES ('File001',1000, ....); etc.

    The ID would be added automatically. Without seeing the schema I could be wrong but it is a fairly common practice to have the record id increment automatically.

    Regards...jmcc


  • Registered Users Posts: 2,660 ✭✭✭Baz_


    may I ask why product #1 is being deleted??

    Or is it just when you are testing the database, and you have deleted it by hand???


Advertisement