Re: Questions regarding inserting and updating data into a MySQL db

From: Date: Tue, 10 Sep 2002 22:24:04 +0000
Subject: Re: Questions regarding inserting and updating data into a MySQL db
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-115897@lists.php.net to get a copy of this message
You should search for some SQL tutorials on the Web. What it sounds like you are looking for is the "update" SQL statement which modifies an existing row (for your second form, for example). Thus, you "insert" the row to create it (which assigns the key using the auto increment), then "update" that row to make any modifications you need to after that. Happy hacking. Chris Axis Computers wrote:
I'm developing a web application that uses forms for user input and then after each form is filled shows something like Welcome Bob to our site ... bla. bla... inserts data in a table and on the same page continues with the rest of the data, and goes to another form and so on. I have no problems inserting the data from the first form in the table, display the personalized message, and then connect to the mySQL db, my problem is some fields in the table which must be filled are null in this first instance, and then on the second form they are filled, but my I don´t know how can I fill the gaps and leave all the data in one row, because the first field auto increments, and I'm worried the data instead of filling one row spreads accross two or three.


« previous php.general (#115897) next »