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. Quote 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. Quote 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? Quote 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. Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.