Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google      Sign In   
  • Create Account

Subscribe to HRA Now!

 



Are you a Google Analytics enthusiast?

Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE! 

 



 

 www.CustomReportSharing.com 

From the folks who brought you High Rankings!



Photo
- - - - -

Update Multiple Rows In Mysql V5.0


  • Please log in to reply
3 replies to this topic

#1 piskie

piskie

    HR 7

  • Active Members
  • PipPipPipPipPipPipPip
  • 1,098 posts
  • Location:Cornwall

Posted 25 March 2010 - 04:03 PM

Could someone please give me some guidance on how best to update a single field (paid) in multiple rows in the same table.
I need to update all selected records for the same customer reference with a single action from a form.

There are about 20+ fields in the table and I only want to update the "paid" field for all rows with the same reference typically 1 to 50.
Each row has a unique ID called auto.

I am out of my depth trying this myself and running out of time, so any advice or tutorials would be greatly appreciated.

#2 madams

madams

    HR 5

  • Active Members
  • PipPipPipPipPip
  • 504 posts
  • Location:Costa Blanca, Spain

Posted 25 March 2010 - 05:46 PM

I would try this site

They are really helpful

#3 Mhoram

Mhoram

    HR 4

  • Active Members
  • PipPipPipPip
  • 114 posts
  • Location:Quincy, Illinois, USA

Posted 25 March 2010 - 08:14 PM

It depends on what you want to update about it, but the basic idea is:

CODE
UPDATE mytable SET paid = 'whatever' WHERE reference = 'something';

To help any more than that, we'd need to know more.

#4 piskie

piskie

    HR 7

  • Active Members
  • PipPipPipPipPipPipPip
  • 1,098 posts
  • Location:Cornwall

Posted 28 March 2010 - 11:15 AM

Thanks for tyhe response Mhoram, I will explore that over the next couple of days and come back with more details if I get stuck.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

SPAM FREE FORUM!
 
If you are just registering to spam,
don't bother. You will be wasting your
time as your spam will never see the
light of day!