List:General Discussion« Previous MessageNext Message »
From:darren Date:June 28 2004 3:42pm
Subject:select and update field in one query
View as plain text  
Hi all,

I need to select the top 1000 records based on the "usage" field and update
the "checked" field to '1'.

I am currently doing it in 2 statements; i.e. select first then update from
a MYSQL_ROW array. How do I do it in just a single statement?

Please advice on a better way. Also...will doing this in one statement be
more efficient from the server perspective?

Thanks in advance

Thread
Rows CounterJavier Diaz28 Jun
  • select and update field in one querydarren28 Jun
    • Re: select and update field in one queryRhino28 Jun
      • Re: select and update field in one queryMichael Stassen28 Jun
Re: select and update field in one querySGreen28 Jun