Results 1 to 3 of 3

Thread: MySQL Problem

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2002
    Posts
    4

    MySQL Problem

    Hello,

    I have a table with 5 columns; id, name, email, code and ip. id is set to auto_increment.
    I have one form that adds rows with just the code column filled and the others left blank. Now, I want another form to update those rows to fill the rest of the columns. I want it to update the next row each time someone submits the form. I know how to use update, but not how to do a unique row each time.
    Can anyone help?

    Thanks in advance.

  2. #2
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Just use WHERE to indicate the ID:

    UPDATE table SET thing='something' WHERE id='4';

    You could use a variable or whatever in place of 4.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  3. #3
    scoutt
    Guest

    Re: MySQL Problem

    Originally posted by deicide
    Now, I want another form to update those rows to fill the rest of the columns. I want it to update the next row each time someone submits the form. I know how to use update, but not how to do a unique row each time.
    Can anyone help?

    Thanks in advance.
    ok I am a little confused. you want a form to update the next row? what next row? it sounds like you want to update the row the user wants? you will have to have the user pick the info (usually a link in the member page for that user) that is not hard and it goes along the lines of what my bestest buddy hobo said

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width