Jump to content

UPDATE SET in same field twice possible?


xwishmasterx

Recommended Posts

Below is part of my existing code:

 

UPDATE vtp_members SET hits=(hits + $random_number)

 

Can I update same field again like so?:

 

UPDATE vtp_members SET hits=(hits + $random_number), hits=(hits + 100)

 

Any problems with this or will it work and add both the random_number and +100 to the filed?

Link to comment
https://forums.phpfreaks.com/topic/234965-update-set-in-same-field-twice-possible/
Share on other sites

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.