RE: [PHP-DB] Updating Many Records
| From: | Peter Lovatt | Date: | Thu, 18 Apr 2002 22:29:38 +0000 |
| Subject: | RE: [PHP-DB] Updating Many Records | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-18662@lists.php.net to get a copy of this message | ||
IF there is a formula for the value of quantity eg Quantity = Quantity -1
(UPDATE table SET Quantity = Quantity-1 ) you need to do an update statement
for each row
EG UPDATE table SET Quantity = "9" WHERE Field = Book3
HTH
Peter
-----------------------------------------------
Excellence in internet and open source software
-----------------------------------------------
Sunmaia
www.sunmaia.net
info@sunmaia.net
tel. 0121-242-1473
-----------------------------------------------
> -----Original Message-----
> From: Bzdpltd@aol.com [mailto:Bzdpltd@aol.com]
> Sent: 18 April 2002 14:21
> To: php-db@lists.php.net
> Subject: [PHP-DB] Updating Many Records
>
>
> I am not sure if this is possible.
>
> I have a database, and we fetch all the records and then list them.
>
> What we need is the one field in the database to be able to be updated.
>
> Now the field will have different values for each record. Is it
> possible to update the table with lots of different values?
>
> So for example we have:
>
> Field Qantity
> Book 1 5
> Book2 6
> Book3 9
>
> Now when we are shown all these records the quantity is a form
> field and we want to change this but for each record?
>
> Hope the above is enough to go on.
>
> Barry
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>