Jump to content

Code to only change last updated field from profile in mysql db?


bnovak

Recommended Posts

I have a profile system, that when a member makes any changes to their information, this code runs.

  

mysql_select_db("myDB", $con);

mysql_query("UPDATE profile SET account='Enrollment Manager - Standard' 
WHERE accountName LIKE '%manager%' and account= 'empty'");

mysql_query("UPDATE profile SET account='Enroller - Standard' WHERE account= 'empty' ");

 

but...I'm pretty sure this is running through every single row in the db.

 

is there something simple I can put in there so it only does the row with the associated profile that just got changed and not everyone in the db? Or, does it not really matter? (I'll never have more than 10,000 rows so it isn't a huge DB anyway :))

[/code]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.