List:General Discussion« Previous MessageNext Message »
From:Gelu Gogancea Date:December 18 2002 7:40pm
Subject:Re: SELECT and UPDATE at the same time?
View as plain text  
Hi,
You can use REPLACE...SELECT

Regards,

Gelu
_____________________________________________________
G.NET SOFTWARE COMPANY

Permanent e-mail address : gg@stripped
                                          gelugogancea@stripped
----- Original Message -----
From: "Jeff Snoxell" <Jeff@stripped>
To: <mysql@stripped>
Sent: Wednesday, December 18, 2002 7:56 PM
Subject: SELECT and UPDATE at the same time?


> Hello again,
>
> I'm selecting a group of records from my database. I then loop through the
> selected records and do some work based on what I find. But what I also
> want to do as I interrogate each record is update some of its fields with
> new values... but won't that screw up the outer loop? I mean if I try to
> execute a query whilst looping around the result set of a former query
will
> I not screw up my result set that I'm looping through?
>
> Also, is it possible to update specific fields of certain records within a
> SELECT query? ie can I do something like this:
>
> SELECT * FROM my_table WHERE Age > 50 AND UPDATE Status = "OLD"
>
> Ta,
>
>
> Jeff
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <mysql-thread127840@stripped>
> To unsubscribe, e-mail <mysql-unsubscribe-ggelu=arctic.ro@stripped>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>

Thread
SELECT and UPDATE at the same time?Jeff Snoxell18 Dec
  • Re: SELECT and UPDATE at the same time?Paul DuBois18 Dec
    • Re: Re: SELECT and UPDATE at the same time?Jeff Snoxell18 Dec
      • RE: Re: SELECT and UPDATE at the same time?Mike Hillyer19 Dec
  • Re: SELECT and UPDATE at the same time?Gelu Gogancea18 Dec
    • Re: SELECT and UPDATE at the same time?Paul DuBois18 Dec
  • RE: SELECT and UPDATE at the same time?Dan Cumpian19 Dec
    • RE: SELECT and UPDATE at the same time?Paul DuBois19 Dec
RE: SELECT and UPDATE at the same time?ir00038719 Dec
RE: SELECT and UPDATE at the same time?Paul DuBois19 Dec
  • RE: SELECT and UPDATE at the same time?Dan Cumpian20 Dec