RE: [PHP-DB] select and update together
| From: | Robert V. Zwink | Date: | Mon, 21 Jan 2002 16:17:58 +0000 |
| Subject: | RE: [PHP-DB] select and update together | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-16024@lists.php.net to get a copy of this message | ||
http://www.mysql.com/doc/U/P/UPDATE.html
UPDATE catalogs SET PROCESSED = "Y" WHERE PROCESSED IS NULL LIMIT $i,10
Is this what you are looking for?
Robert V. Zwink
http://www.zwink.net/daid.php
-----Original Message-----
From: James Kupernik [mailto:kupernik@bcn.net]
Sent: Monday, January 21, 2002 10:56 AM
To: php-db@lists.php.net
Subject: [PHP-DB] select and update together
Is it possible to select 10 records that have a NULL field and update that
field to become Y instead of NULL? If so what would this syntax be?
This is what I have now
$result = mysql_query("SELECT * FROM catalogs WHERE PROCESSED IS NULL LIMIT
$i,10");
I want to add an UPdate to it, but not sure it's possible.
Thanks for any advice you can provide.
James
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
For additional commands, e-mail: php-db-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net