xwishmasterx Posted April 30, 2011 Share Posted April 30, 2011 I have this part of an UPDATE code this seems to return a value no matter what I set it too: AND team_treasure>=((members_count)*1000) although members_count times 1000 is much higher than team_treasure it still returns as if it is equal or lower. Can someone help me on how to write this simple calculation? Quote Link to comment https://forums.phpfreaks.com/topic/235187-simple-calculation/ Share on other sites More sharing options...
fugix Posted April 30, 2011 Share Posted April 30, 2011 AND team_treasure>='members_count * 1000' Quote Link to comment https://forums.phpfreaks.com/topic/235187-simple-calculation/#findComment-1208658 Share on other sites More sharing options...
PFMaBiSmAd Posted April 30, 2011 Share Posted April 30, 2011 What is the data type of your team_treasure and members_count columns? Quote Link to comment https://forums.phpfreaks.com/topic/235187-simple-calculation/#findComment-1208675 Share on other sites More sharing options...
Pikachu2000 Posted April 30, 2011 Share Posted April 30, 2011 AND team_treasure>='members_count * 1000' That would make 'members_count * 1000' a string. Quote Link to comment https://forums.phpfreaks.com/topic/235187-simple-calculation/#findComment-1208711 Share on other sites More sharing options...
fugix Posted April 30, 2011 Share Posted April 30, 2011 my mistake...remove the single quotes then Quote Link to comment https://forums.phpfreaks.com/topic/235187-simple-calculation/#findComment-1208714 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.