Re: How to Execute Multiple SQL Updates Using PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 19, 2008 at 2:51 PM, Ashley Sheridan
<ash@xxxxxxxxxxxxxxxxxxxx>wrote:

> On Wed, 2008-11-19 at 18:51 +0000, Alice Wei wrote:
> > Hi,
> >
> >   I am inquiring on this list to see if it is possible to create a script
> that takes multiple update statements without my having to write one "SQL"
> statement for each of the updates.
> >
> >   I have a scenario of which I create a table of some sort with some
> existing information using Flex, and what I am told by my client is that no
> matter how many records there are on the screen, the users should be able to
> update any up to all the entries by simply pushing a button. I use Microsoft
> SQL, which I think that it does allow multiple update query execution. The
> problem is that I might have to come up with some method to accept all the
> "POST" variables the user provides into the script.
> >
> >    Could anyone please give me some guidance on what kind of function I
> might use, or whether or not it is possible I can create a script that
> accepts as many "POST" variables as the users POST?
> >
> > Thanks a lot for your help.
> >
> > Alice
> >
> > _________________________________________________________________
> > Check the weather nationwide with MSN Search: Try it now!
> > http://search.msn.com/results.aspx?q=weather&FORM=WLMTAG
> When I'm stuck on queries I always fall back to see how phpMyAdmin would
> treat it. Do a dummy run in there by updating a few rows of information
> at once, and then see what the SQL it produces looks like. You can
> perform multiple queries by using semicolons. Bear in mind that the
> queries are still treated as separate, so you may want to do them as a
> transaction if you need to fall back in-case of a problem.
>
>
> Ash
> www.ashleysheridan.co.uk
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
One thing to watch there is that you don't exceed the max query size limit
(which looks to be about 64K in size) for the sql string

-- 

Bastien

Cat, the other other white meat

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux