Can someone tell me the process in updating multiple rows at once? I've been updating one row at a time with:
Code:
$result = mysql_query("UPDATE tablename SET field='$field'")
or die(mysql_error());
I'm curious as to how I could have multiple rows at once, and then edit them all all at one time. Let's use a user database as an example. Right now, I just print out every single user with a link as their name which takes me to their own page. I'd like to be able to edit the page in which they all print out.
Username: [ yarub ] Password: [ **** ] Email: [
yarub@yarub.com ]
Username: [ fred ] Password: [ **** ] Email: [
fred@yarub.com ]
Username: [ john ] Password: [ **** ] Email: [
john@yarub.com ]
[ update ]
The brackets represent input fields obviously. Can someone run me through the process of making this work? I have absolutely no idea and can't find any tutorials on it.
Thanks.
The screenshot below is what I'm trying to use it for. At the bottom of the list is a single update button.
http://lsms.reshasha.com/image/screens/pic4.jpg