Jump to content


Photo

update numerous records


  • Please log in to reply
2 replies to this topic

#1 brown2005

brown2005
  • Members
  • PipPipPip
  • Advanced Member
  • 943 posts

Posted 12 April 2006 - 11:51 AM

If i have

1, 2, 3, 4, 5

how can i update table1 field number for 5 records randomly?

#2 shocker-z

shocker-z
  • Members
  • PipPipPip
  • Advanced Member
  • 864 posts
  • LocationNottingham

Posted 12 April 2006 - 12:00 PM

huh?? Dont get what you mean..
www: www.ukchat.ws | irc: irc.ukchat.ws chan: #blufudge

#3 brown2005

brown2005
  • Members
  • PipPipPip
  • Advanced Member
  • 943 posts

Posted 12 April 2006 - 12:05 PM

you helped me on my other topic and you gave me

UPDATE table2 SET `fieldname` = (SELECT letter FROM table1 ORDER BY RAND())

but that didnt work..

what i want to do is

take say 10 records from one table....

and update a field in 10 records from a different table but using the 10 above randomly




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users