dragonusthei Posted October 17, 2006 Share Posted October 17, 2006 UPDATE order_numbers SET order_number - 3doesnt work so how would i update a table and take a number away from a field. Link to comment https://forums.phpfreaks.com/topic/24277-corrent-mysql-syntax-for-this-minus-query/ Share on other sites More sharing options...
printf Posted October 17, 2006 Share Posted October 17, 2006 [quote author=dragonusthei link=topic=111840.msg453424#msg453424 date=1161126356]UPDATE order_numbers SET order_number - 3doesnt work so how would i update a table and take a number away from a field.[/quote]Just use the column name your subtracting from![code]UPDATE order_numbers SET order_number = ( order_number - 3 ) WHERE some_column = some_value[/code]me! Link to comment https://forums.phpfreaks.com/topic/24277-corrent-mysql-syntax-for-this-minus-query/#findComment-110335 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.