simcoweb Posted October 13, 2012 Share Posted October 13, 2012 Amazing I couldn't find this just Googling it but the results hit all around it but nothing specific. What I need to do is: 1) modify/overwrite the content in the field called 'couponname' 2) but only for the entries that are in a range of 'couponid' of 61202 and 61267 I tried this but got a syntax error: UPDATE isc_coupons SET couponname = replace(couponname,'CBS Local 7-2012') WHERE couponid BETWEEN 61202 AND 61267 A little help, please! Thanks in advance. Link to comment https://forums.phpfreaks.com/topic/269412-need-simple-syntax-help-to-replace-a-field-within-range-of-ids/ Share on other sites More sharing options...
Jessica Posted October 13, 2012 Share Posted October 13, 2012 If you just want to change it just set it to the new value. No replace. Link to comment https://forums.phpfreaks.com/topic/269412-need-simple-syntax-help-to-replace-a-field-within-range-of-ids/#findComment-1384920 Share on other sites More sharing options...
simcoweb Posted October 13, 2012 Author Share Posted October 13, 2012 Sample, please? Link to comment https://forums.phpfreaks.com/topic/269412-need-simple-syntax-help-to-replace-a-field-within-range-of-ids/#findComment-1384932 Share on other sites More sharing options...
simcoweb Posted October 13, 2012 Author Share Posted October 13, 2012 UPDATE isc_coupons SET couponname ='CBS Local 7-2012' WHERE couponid BETWEEN 61202 AND 61267 I think that did the trick. Link to comment https://forums.phpfreaks.com/topic/269412-need-simple-syntax-help-to-replace-a-field-within-range-of-ids/#findComment-1384934 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.