Re: Is there a short way to?
| From: | CPT John W. Holmes | Date: | Tue, 15 Apr 2003 16:00:31 +0000 |
| Subject: | Re: Is there a short way to? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-27102@lists.php.net to get a copy of this message | ||
> I have a MySql table that I am trying to post data from a form (basic
> stuff but wait a minute)
>
> It has thirty cols but what I am trying to do is not have a form with 30
> fields but split it into little relevant bits and post them bits as I
> go.
>
> My question is do I HAVE to "insert into table
> (name,all,the,30,cols,here) values(var1,var2,var3,and,so,on)
>
> Or is there a glamorous way of only putting the data from the form into
> the affected rows?
I think the best method is to store all 30 answers in the session as you go
along and then do one large insert at the end.
If you break it up into an INSERT followed by some UPDATES for the rest of
the data, you also have to program in a system that's going to wipe the half
completed surveys that might end up in the system.
---John Holmes...