Quote:
Originally Posted by Domain Epidemic Hello,
New to php/mysql and phpmyadmin.
I need to change a fields value for muliple records.
Example: it is a checkbox/clickable table "0" = not active and "1" = active.
I would imagine a fairly simple task. Any link to the answer or assistance would be greatly appreciated.
C.
Sorry if the terminology is poor! |
Well, depends on what you're asking, really. If you want to change that particular field for all the records in your database, it would probably be easier to run a SQL command. IE:
Code:
UPDATE tablename SET fieldname='whatever value you want changed'
That will change all the records in the table you choose with the field name of what you choose to the value in the quotes. Change the tablename to whatever table you want and fieldname to the field you want, and the stuff in quotes to the value you want. You can run that directly in phpMyAdmin in the SQL box. Make sure you are in the appropriate database section before running the command. Optionally, you can append
Code:
WHERE fieldname='1'
This will change the values you want from above where the name matches with the field name with the WHERE clause. 1 is obviously there as a placeholder, that's where you'll want to put your limiter. (of which, LIMIT is another clause, but not what you're looking for right now, I don't believe)
I hope this helps you out. I tried to work with the specifics you gave me, and this is as abstract as I could get lol.
EDIT: Totally didn't see the date on this, I apologize.