The-Last-Escape Posted May 2, 2007 Share Posted May 2, 2007 Hi, I have a table named brokers and am trying to add numbers from a menu to an existing number in a field named value_votes . I tried it with the UPDATE command in sql but this just replaced my old number not added to it. I know I need to do something along these lines: UPDATE brokers SET value_votes WHERE value_votes = existing number + new number from form , that last little bit is over my head, can anybody help me with that syntax Link to comment https://forums.phpfreaks.com/topic/49688-solved-update-records-problem/ Share on other sites More sharing options...
trq Posted May 2, 2007 Share Posted May 2, 2007 UPDATE brokers SET value_votes = value_votes + 1 WHERE id = 5; This would add one to value_notes in the record with an id of 5. Link to comment https://forums.phpfreaks.com/topic/49688-solved-update-records-problem/#findComment-243611 Share on other sites More sharing options...
The-Last-Escape Posted May 2, 2007 Author Share Posted May 2, 2007 Thanks Trope your the true King Of Kings Link to comment https://forums.phpfreaks.com/topic/49688-solved-update-records-problem/#findComment-243613 Share on other sites More sharing options...
trq Posted May 2, 2007 Share Posted May 2, 2007 Please... stop calling me Trope. :-) Link to comment https://forums.phpfreaks.com/topic/49688-solved-update-records-problem/#findComment-243616 Share on other sites More sharing options...
The-Last-Escape Posted May 2, 2007 Author Share Posted May 2, 2007 Sorry I mean Thorpe Link to comment https://forums.phpfreaks.com/topic/49688-solved-update-records-problem/#findComment-243624 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.