blueman378 Posted May 12, 2008 Share Posted May 12, 2008 hi guy i was wonderin is there any way to format a single query so that mysql will add 1 to a value in a database without us having to retreive the original value first? thanks guys Quote Link to comment https://forums.phpfreaks.com/topic/105226-solved-database-value-1-without-retrieving-initial-value/ Share on other sites More sharing options...
bilis_money Posted May 12, 2008 Share Posted May 12, 2008 maybe you can give us example or your codes show them here. Quote Link to comment https://forums.phpfreaks.com/topic/105226-solved-database-value-1-without-retrieving-initial-value/#findComment-538818 Share on other sites More sharing options...
corbin Posted May 12, 2008 Share Posted May 12, 2008 UPDATE some_table SET some_column = some_column+1; Quote Link to comment https://forums.phpfreaks.com/topic/105226-solved-database-value-1-without-retrieving-initial-value/#findComment-538825 Share on other sites More sharing options...
haku Posted May 12, 2008 Share Posted May 12, 2008 Did you try that out? Quote Link to comment https://forums.phpfreaks.com/topic/105226-solved-database-value-1-without-retrieving-initial-value/#findComment-538872 Share on other sites More sharing options...
blueman378 Posted May 12, 2008 Author Share Posted May 12, 2008 yeah thanks it worked Quote Link to comment https://forums.phpfreaks.com/topic/105226-solved-database-value-1-without-retrieving-initial-value/#findComment-539497 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.