FRIHOSTFORUMSSEARCHFAQTOSBLOGSCOMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Mysql set for all?





Diablosblizz
Hey I wanted to do something like this (if this was an actual code):

Code:
 mysql_query("UPDATE `members` SET `pollv` = '0' FOR ALL");


I want the code to reset all the pollv to 0 for ALL users. Is this possible?
DjinniFire
If I'm not mistaken you can just have

Code:

mysql_query("UPDATE `members` SET `pollv`='0'");


and it'll set every row with pollv to 0 and since it doesn't effect indexing of the table you don't need to order how you update the table

otherwise you could just count the rows of the table and put LIMIT $rows and it should update every row
Related topics
HTTP AUTH with PHP and mySQL
how to set up a server
Mysql error!
ALTER TABLE mySQL problem.
How to set authorisations -Windows sys / Apache webserver
MySQL DB Backup script - minor problem
MySQL Masters Binary Logs & Replication?
mySQL set-up on Frihost help please
Domain Help
Joomla + mysql + Character set
MySQL Set-up Structure - Help!!!
Crazy language/character set in MYSQL! HELP, PLEASE!!!
Mudança de caracter set no MYSQL.
MySQL scaling doubt
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.