bigjoe11a Posted October 18, 2011 Share Posted October 18, 2011 Is there an easy way of updating a lot of records with using the same line over and over again. See I would have to repeat the same line over with new values and fields every time I wanted to update a lot of records. mysql_query("UPDATE profiles SET age='21' WHERE id='1'"); I would have to run that line above over and over again. Any one else have a better way of doing this. Joe Link to comment Share on other sites More sharing options...
thescientist Posted October 18, 2011 Share Posted October 18, 2011 a loop would be the most obvious choice (using a SELECT first) if you are doing this from PHP or some sort of server side language. Alternatively, perhaps you could use the wildcard (*) as the value of id. not so sure about that one though. Link to comment Share on other sites More sharing options...
bigjoe11a Posted October 18, 2011 Author Share Posted October 18, 2011 Well I fount a sample of how to do it. It's just a ran into another problem. So I guess I'll have to get that one problem fixed before moving on to this. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.