nightkarnation Posted April 21, 2009 Share Posted April 21, 2009 Hello! My doubt is the following...i want to update something but not erase whats already stored just add more into it...i could do this with INSERT INTO but i need to use the WHERE statement... Here's the idea: UPDATE `nkSoft_clientProjects` SET description = description + 'Blah blah new description' WHERE name = 'Diego' AND project = 'Software Test' Obviously this code is not giving the expected value...description is giving a new value of 0... Any way to get around this through the UPDATE code? and/or through the INSERT INTO using the WHERE statement? Thanx in advance! Cheers, Link to comment https://forums.phpfreaks.com/topic/155120-update-but-leave-whats-already-saved/ Share on other sites More sharing options...
nightkarnation Posted April 21, 2009 Author Share Posted April 21, 2009 Or to make it more clear...this is what i want to do: UPDATE `nkSoft_clientProjects` SET description += 'Blah blah new description' WHERE name = 'Diego' AND project = 'Software Test' Link to comment https://forums.phpfreaks.com/topic/155120-update-but-leave-whats-already-saved/#findComment-815991 Share on other sites More sharing options...
rondog Posted April 21, 2009 Share Posted April 21, 2009 hmm try: UPDATE nkSoft_clientProjects SET description=CONCAT(description,'Blah blah new description') WHERE name = 'Diego' AND project = 'Software Test' Link to comment https://forums.phpfreaks.com/topic/155120-update-but-leave-whats-already-saved/#findComment-816000 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.